diff options
author | Matt Beckett <beck24@gmail.com> | 2013-12-23 00:26:51 -0800 |
---|---|---|
committer | Matt Beckett <beck24@gmail.com> | 2013-12-23 00:26:51 -0800 |
commit | 013716a94a8a723721d876f99c6413ab580b69f5 (patch) | |
tree | f6c4b969e76fb519aa6d6dbd2b67e689162bc792 /engine/lib/memcache.php | |
parent | b0a62995706d2b7796ad30c7e0bc6471cb268de0 (diff) | |
parent | 908628e622d798c5036f7e25bc5b7d6d36d64754 (diff) | |
download | elgg-013716a94a8a723721d876f99c6413ab580b69f5.tar.gz elgg-013716a94a8a723721d876f99c6413ab580b69f5.tar.bz2 |
Merge pull request #6251 from jeabakker/3143-memcache-entity-cache-on-login
fixes #3143 login part
Diffstat (limited to 'engine/lib/memcache.php')
-rw-r--r-- | engine/lib/memcache.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/lib/memcache.php b/engine/lib/memcache.php index f79fba4a9..79b87e850 100644 --- a/engine/lib/memcache.php +++ b/engine/lib/memcache.php @@ -35,3 +35,23 @@ function is_memcache_available() { return $memcache_available; } + +/** + * Invalidate an entity in memcache + * + * @param int $entity_guid The GUID of the entity to invalidate + * + * @return void + * @access private + */ +function _elgg_invalidate_memcache_for_entity($entity_guid) { + static $newentity_cache; +
+ if ((!$newentity_cache) && (is_memcache_available())) {
+ $newentity_cache = new ElggMemcache('new_entity_cache');
+ } +
+ if ($newentity_cache) {
+ $newentity_cache->delete($entity_guid);
+ } +}
\ No newline at end of file |