-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis clear method #207
Comments
What do you mean exactly by "no clearing executed"? Does $pool->getItem('34', 'templates', 'page1')->isMiss() return false after using clear()? Or do you mean that there is still something on the Redis server? If that's the problem, then look at this issue |
Sorry ... "no clearing executed" means that key "34/templates/page1" was not deleted from Redis |
So if you retrieve ""34/templates/page1" again you get the value back and isMiss returns false, even though you cleared it? Can you show me a full script executing this? |
the problem is not in isMiss method. The problem is in the following:
|
Can you please answer my question? If you attempt to retrieve "34/templates/page1" and "34/templates/page2" from the caching system after clearing them what happens? |
I will try at the moment, one minute) |
Yes, result of "var_dump($item->isMiss())" is "true", it's correct. |
Sorry to disappear from the conversation. In order to get hierarchal caching to work Stash uses an index system that relies on numbered keys. When things are purged those keys are incremented and the stale items get orphaned. The downside to this method is that it isn't easy to clear those purged items from inside Stash itself, but the two systems we do this with (Redis and Memcache) will handle that automatically using the "Least Recently Used" expiration method. |
Closing this out as it's expected behavior. |
I save cache in Redis with this code:
$item = $pool->getItem('34', 'templates', 'page1');
$data = $item->get();
if($item->isMiss()) {
...
}
$item->set($data);
But then I execute:
$pool->getItem('34', 'templates')->clear();
And NO clearing was executed, may be I do simething wrong?
The text was updated successfully, but these errors were encountered: