I was browsing the memcache code and it doesn't look like it currently supports the ability to choose (via cache_set) whether I want something to be cached in memcache or via the database cache table. Such an option would be useful to me, since I'd possibly not like to fill up my memcache with large data such as cached pages, but I would like to use it to cache other sorts of things. Since memcache is a drop in replacement for the currnet caching API, unless I am wrong, it doesn't look like there's a way to choose which cache to store data in.

Could this be added as an optional parameter to cache_set perhaps?

Regards,
Jonathan

Comments

robertdouglass’s picture

No, this feature isn't currently supported. You could, however, use the memchache.db.inc file which has database failover, and just make the bin that takes page caching really small, like 4M. Memcache will keep the most used 4M worth of pages in there for you, and will go to the database for the rest.

slantview’s picture

Status: Active » Closed (works as designed)