- Sensible result handling (differentiating null from not found)
- Tagging with expiration
- Use Memcache, Redis, etc. protocols as heavily as possible
- CSL: caching specific language: store, load, expire, write through, write back, hit, miss
- Hashing strategies with mutiple storage backends
- Check and set (Memcache)
- Load/Save many
- Storage directors:
- Size based
- Hash based
- Value/key based
<?php
$cache->load('key', function(Kesch\Result $result) {
if ($result->isHit()) {
}
});
<?php
$result = $cache->load('key');
if ($result->isMiss()) {
// Regenerate
}
<?php
$cache->store('key', 'value');
<?php
$cache->store('key', function() {
});
<?php
$cache->store('key', 'value', function($key, $value) {
// Update another storage
});
<?php
$cache->store(new Kesch\Key('test', array('tag1', 'tag2')), 'value');
<?php
$cache->delete(new Kesch\Tags(array('tag1', 'tag2')));