[development] memcache

Robert Douglass rob at robshouse.net
Wed Mar 7 11:45:01 UTC 2007

The API for this is in place. Steve Rude and I will be overhauling the 
current memcache code to better utilize the built-in cache 
infrasctructure. Basically, it should all start with a cache_{custom 
table name} table and use cache_get and cache_set. Module developers are 
getting wise to the benefits of having their own cache tables (Views), 
and when I've evaluated and committed Steve's code, we'll have a caching 
system that first looks to memory based caching and then to db based 
caching for any given resource. This way, we can approach all caching 
issues in a general way, and the merits of node caching, for example, 
can be discussed in the context of Drupal core without having to worry 
about compatibility with the caching layer.


Chris Johnson wrote:
> I don't quite understand Dries remark "I'm fairly convinced that 
> memory-based caching ... is the way forward rather than file-based 
> caching."  That remark seems to presuppose knowing every site's and 
> host's situation (impossible) or to say that file-based caching will 
> never provide enough performance benefit over what we have now.
> I think the real way forward is object-based caching hooks in core and 
> a pluggable cache interface.  Ideally, one would have tiered caching, 
> so that more than one cache mechanism could be plugged in, and various 
> types of caching (object, page, menu, query, etc.) could be assigned 
> to one of the available mechanisms.  However, that ideal would be many 
> steps down the road, if ever, due to the complexity involved.
> Instead, we should at least allow site owners to chose amongst memory, 
> file and database caching at a minimum.
> As for object-based caching, start with nodes.  Eventually, add other 
> common objects, e.g. users, and provide an API(?) to make it easy for 
> contrib modules which create new objects to cache their objects  as well.

* * * * *
Lullabot's First Ever Advanced Workshops Are Here!
Drupal API & Module Building - Advanced Drupal Themeing
April 9th-13th - Providence, RI
Early Bird Discounts Available Now
* * * * *

More information about the development mailing list