Adding `increment` and `decrement` methods?
Do you have thoughts about adding a standard "increment" function for the AbstractCache.php in apix-cache? I know that both Redis and Memcached have this function, and its something I need at the moment -- using ->getAdapter()->... Instead. Jonathan
Adding increment/decrement methods to AbstractCache.php would be useful indeed.
It would be good to have a base/inhertied implementations generic enough so that backends without dedicated functions would still benefit.
PDO, Runtime and Filesystem(s) don’t have dedicated (in|de)crementors — the rest do.
Essentially, a base implementations would be a two steps affair, i.e. retrieve and update/upsert a (numerical) value. The default (in|de)cremental value being 1.
I've added definitions to the interface. Working on a generic version in AbstractCache.php and will do specific implementations for at least Redis and Memcached.
@jspalink any progress on this?