Re: [PATCH v2] Do not release entries that may be kept in local memory cache.

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Thu, 05 Jul 2012 11:24:15 -0600

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.
Received on Thu Jul 05 2012 - 17:24:21 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 05 2012 - 12:00:03 MDT