Instead of:
Code: Select all
$my_cache = $this->cache->get('my_cache');
$my_cache['new_variable'] = 1;
$this->cache->put('my_cache', $my_cache);
Code: Select all
$this->cache->put('my_cache[new_variable]', 1);
Here are some other types:
$this->cache->put('my_cache[some][array]', 1); // Several arrays
$this->cache->put('my_cache["some"][\'sub\'][arrays], 2); // With " and '
$this->cache->put('my_cache[temp][]', 3); // Each time new row for my_cache[temp], like $array[] = 1;
$this->cache->put('my_cache{the}{other}{type}', 4);
also
$this->cache->get('my_cache[temp]');
Advantages:
Easier, faster and better usage of caching in phpbb.
Usable for caching some temporary content (like anonymous user data, session or etc)
Here is example:
http://phpbb-bulgaria.com/tests/abc.php
http://phpbb-bulgaria.com/tests/abc.php ... custom=abc // Hilit the code
I'll post source soon, I just want to know is it worth to do it.