Ask Bjørn Hansen wrote:
One thought I had was that it'd make sense to have either separate
methods/hooks/functions or an extra parameter to specify "cache" or
"store".
"Cache" would be stored in a potentially volatile store (memcached)
and "store" would be stored somewhere more permanent (sqlite, mysql,
file system, ...).
Either type of storage should also have an (optional?) TTL/expiration
time.
I would use this if it was available, but if only one method were
available, I wouldn't find it too difficult to simply make a maps of the
keys that I want to store in, say, memcached vs. the DB, and write two
plugins that return DECLINED when the key in question isn't in its
respective map.
In fact... what if instead of adding a new method, we just made notes()
plugin-able under the same principle? If my DB plugin declines it, I
give it to the memcached plugin, and if that declines it, it goes to the
usual $foo->{_notes} method?
-Jared