26 $this->cache =
new CompositeCache(
'query_cache', $this->config, $flags);
28 $this->enabled = $this->config->db_disable_query_cache !==
true;
29 if (isset($this->config->db_query_cache_limit)) {
30 $this->query_cache_limit = (int) $this->config->db_query_cache_limit;
67 $this->keys[
$key] =
true;
69 if (count($this->keys) > $this->query_cache_limit) {
70 $this->
delete(array_key_first($this->keys));
81 if (isset($this->keys[
$key])) {
83 unset($this->keys[
$key]);
84 $this->keys[
$key] =
true;
87 return parent::load(
$key);
93 public function delete(
string $key):
bool {
94 unset($this->keys[
$key]);
96 return parent::delete(
$key);
if(! $entity instanceof \ElggUser) $data
Volatile cache for select queries.
load(string $key)
{Retrieve the contents of a cached item.Identifier of the cached itemmixed null if key not found in c...
purge()
{Purges the caches.void}
__construct(protected Config $config)
Constructor.
save(string $key, mixed $data, null|int|\DateTime $expire_after=null)
{Saves data in the cache.Identifier of the cached item The data to be saved Number of seconds to expi...
clear()
{Clears the caches.void}
invalidate()
{Invalidates the caches.void}
Extension of the DateTime class to support formatting a date using the locale.
$config
Advanced site settings, debugging section.
if($container instanceof ElggGroup && $container->guid !=elgg_get_page_owner_guid()) $key
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.