phpBB

Development Wiki

Difference between revisions of "PhpBB4/Caching Component"

From phpBB Development Wiki

(Key/Value Cache)
m (Reverted edits by Dog cow (Talk) to last revision by Naderman)
 
Line 2: Line 2:
  
 
Should the ttl be definable on a key level? Or should there be a global setting?
 
Should the ttl be definable on a key level? Or should there be a global setting?
 
Dog Cow thinks that not all keys were created equal, so it should not be global.
 
  
 
<php>interface KeyValueCacheInterface
 
<php>interface KeyValueCacheInterface

Latest revision as of 23:45, 17 December 2009

Key/Value Cache

Should the ttl be definable on a key level? Or should there be a global setting?

interface KeyValueCacheInterface
// incomplete!
    
public function read($key);
    public function 
write($key$value$ttl);
    public function 
delete($key);
    public function 
purge();
    public function 
tidy(); // ocassionally called by cron to clean up the cache if necessary
}

Null

Simply throws away values after the request.

File

Memcache

APC

EAccelerator

XCache