Firefox shipped with support for
The benefits of immutable mean that when a page is refreshed, which is an extremely common social media scenario, elements that were previously marked immutable with an HTTP response header do not have to be revalidated with the server.
304‘s for those resources, because the browser won’t even re-request them 🙂
Using Immutable Caching To Speed Up The Web →
Cache-Control: immutable introductory post →
// create \Memcached object pointing to your Memcached server
$client = new \Memcached();
// create Scrapbook cache object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Memcached($client);
// set a value
$cache->set('key', 'value'); // returns true
// get a value
$cache->get('key'); // returns 'value'
Scrapbook is a caching environment for PHP. The cornerstone is key-value-store, which sets a standard interface for cache adapters to implement. All adapters hide their inner workings behind a shared implementation. Using it means you’re not just building for Memcached. Your code will work just fine on any of the other adapters, without modifications!
Ships with adapters for Memcached, Redis, APC, MySQL, SQLite, etc. Also plays nice with PSR-6 if needed
Scrapbook, PHP Caching Environment →