cache_set() in core allows for the caching of empty or false results. Presently this functionality is only implemented in the db engine - in each of the other engines this has been guarded against through a !empty($value) condition.

This patch brings the functionality of each of the other engines into line with the expected behaviour of drupal's cache_set() method.

I've tested this with the memcache engine only.

Patch made against HEAD.

The patch was developed by IDG Australia.

CommentFileSizeAuthor
cacherouter.emptyvalue2.patch2.38 KBtriclops

Comments

andypost’s picture

Status: Active » Reviewed & tested by the community

On my site I cache parts of block information not every time this pieces are hold data. So I need to store and retrive emtpy strings and arrays with no elements.
This is important because array() and string='' sometimes means something!

slantview’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in latest cvs commit.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.