zend cache (zend file cache) to memcache

If you are tending to use memcache while you are currently using Zend File cache, here are some advices for you.

First, if you use “tagging” in file cache (in memcache there is no tag system from its simplicity), you have to create your own tag system manually. (Tag system is for cleaning cache data with the same tag.) When saving a cache id, you have to collect and save the tag and the ingriendents of the tag.

But where to put this self-made tag data?

If you save this in memcache, it is not reliable, while it can be deleted automatically in the lack of memory.

If you save this on a regular file, at this point, if too many visitors come, file locking can reduce your speed, or can not be written correctly (tries to write the same file by multiple ports)

You see, there can be no solution to this issue with tag system.

So I advice you, if you use Zend_File_Cache with tag system, purify your cache data from tags, or create a static tag array in your php code. There can be only this method that comes to the state “solution”.

Bir Cevap Yazın