/** * Cache the entity in a persisted cache * * @param ElggSharedMemoryCache $cache Memcache or null cache * @param int $last_action Last action time * * @return void * @access private * @internal */ public function storeInPersistedCache(\ElggSharedMemoryCache $cache, $last_action = 0) { $tmp = $this->volatile; // don't store volatile data $this->volatile = []; if ($last_action) { $this->attributes['last_action'] = (int) $last_action; } $cache->save($this->guid, $this); $this->volatile = $tmp; }