How about flushing?
https://github.com/doctrine/cache/blob/85ff6118558d7b2501cd85b31bdc1ffc0cab731a/lib/Doctrine/Common/Cache/CacheProvider.php#L113-L121


Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On 1 December 2014 at 15:30, <[email protected]> wrote:

> I'm running into the same problem. I am using an implementation of
> Jackalope Doctrine DBAL. It uses the Doctrine Cache lib as implemented here:
>
> https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/CachedClient.php
>
> It relies on the deleteAll() command. If I configure the cache to use for
> example ApcCache or FilesystemCache it 'deletes' cache files by defining a
> new NamespaceVersion. This works, but all old cache entries are never
> deleted. After a while this results in a HUGE cache directory (in case of
> filesystem) or in an APC cache that is always full.
>
> How do you recommend we get rid of these old cache entries if I use the
> Apc or FileSystem implementation?
>
>
>
> On Friday, November 21, 2014 4:46:46 PM UTC+1, Guilherme Blanco wrote:
>>
>> Hi Nima,
>>
>> Some drivers just can't delete all keys; it's the case of Memcache which
>> only returns 100 keys for you.
>> Based on that, our solution is to internally create a "version", which we
>> increase if you call deleteAll().
>> That means that your key is something like: <namespace>[<my_key>][<version>],
>> where version = 1 until you call deleteAll().
>> Once deleteAll() is called, we store version = 2 which will automatically
>> invalidate any cache existence when fetching for a given key.
>> This is the reason why deleteAll() has a save instead of a delete.
>>
>> Cheers,
>>
>> On Fri, Nov 21, 2014 at 9:48 AM, Nima Sadjadi <[email protected]> wrote:
>>
>>> An older version is in API site, comparing with that one, I assume this
>>> is a bug in this newer version.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "doctrine-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/doctrine-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Guilherme Blanco
>> MSN: [email protected]
>> GTalk: guilhermeblanco
>> Toronto - ON/Canada
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to