Skip to content

Instantly share code, notes, and snippets.

View demux's full-sized avatar

Arnar Yngvason demux

  • Reykjavík, Iceland
View GitHub Profile
@demux
demux / NsCache.php
Last active June 8, 2017 15:35
I drafted this proposal to solve the problem of deleting all keys with a certain prefix from `memcached`, but we decided to go with `redis` instead, as I'd previously suggested. This is an incomplete Kohana Controller.
<?php
// If we hadn't gone with `redis` I would have implemented something like this
// for abstracing away the "complicated" stuff...
class NsCache() {
// ...
/**
* Get cache from namespace