I am trying to use Memcached to cache all multi-language strings, instead of using a big array for all PHP pages.
What I do, is to fetch the translated phrases from the database and, in a loop, I set each to memcached:
while (fetching database) {
$memcached->set($language.':'.$string_id, $translation, 0, 0);
}
The problem is, most of them (not all, seems random) are automatically "expired" after, no clue why.
These are my stats:
Server's Currently Free Memory: more than 1GB
Total Memcached Space: 16MB
Currently Memcached used: 2.66MB
The "evictions" stats (removed items to free memory for new items) increase allot when I run the cycle. This makes no much sense to me, because I am setting to never expire and memcached has lots of free space, still.
Does anyone know what may be happening?
Thank you.