On 07/05/2012 11:10 AM, Dmitry Kurochkin wrote:

> Do not release entries that may be kept in local memory cache.

> void
>  StoreEntry::trimMemory(const bool preserveSwappable)
>  {
...
> +    if (memoryCachable())
> +        return;
> +


Now we are penalizing the common case of Squid running without any
caching (mem_cache 0) too much.

I suggest adding StoreController::keepInLocalMemory(e) that will
correctly check whether memory caching is enabled at all and then call
e.memoryCachable() to arrive at the final answer. The new method will be
called from StoreEntry::trimMemory(). Will that work better?


Thank you,

Alex.

Reply via email to