Re: ENTRY_SPECIAL => content pinning?

From: Joe Cooper <joe@dont-contact.us>
Date: Sat, 25 May 2002 19:49:52 -0500

Yee Man Chan wrote:
> Hi Joe
>
> --- Joe Cooper <joe@swelltech.com> wrote:
>
>>Hi Yee Man,
>>
>>I was looking at this myself. I think you've missed
>>the store_swapout.c
>>reference to ENTRY_SPECIAL...if you made this the
>>entry type for pinned
>>objects they would never get to disk.
>>
>
>
> You are right that these ENTRY_SPECIAL objects are not
> SwapOutAble. I ran through gdb and see that MIME
> images are loaded to the store_table in mimeInit with
> ENTRY_SPECIAL. So do they always stay in memory and
> never get swapped out?

Right. The icons that Squid uses for FTP directory listings, etc. are
loaded at startup, and I suppose they live in memory for the life of the
process. It wouldn't make sense for them to swap out to disk, since we
already have local copies of them.

>>I think adding a new type "ENTRY_PINNED" that
>>behaves sort of like
>>ENTRY_SPECIAL, without the swapout limitation might
>>be more intuitive
>>and self-explanatory for folks reading the code.
>>
>>My thoughts have run to implementation details:
>>Should pinning use ACLs
>>or a pattern like 'refresh_pattern'?
>>
>
>
> Maybe refresh_pattern because I think people only want
> to pin an object for a period of time instead of
> forever. So something resembles an expiration
> mechanism
> should be appropriate.

Does pinning imply we should be controlling how long an item is fresh?
I was thinking of pinning merely in terms of "These items, marked
PINNED, are priority items, and should not be removed from the cache
object store until they expire (expiry being set via normal mechanisms)."

Maybe I'm missing a useful aspect of what you're getting at, but from my
understanding of the common uses for pinning an object into the cache,
the purpose is to /prefer/ certain objects when deciding what to remove,
not altering how long the object stays fresh. We can already alter how
long an item stays fresh using refresh patterns (and we can enforce
longer freshnesses for patterns using the reload into IMS options,
etc.). I think all a cache_pinned directive needs to do is decide what
gets pinned (and no matter how infrequently it is used, we keep it on
disk). Right? Or do you have other uses in mind?

The concept of cache pinning is quite new to me, so I won't pretend to
know all of the uses for it or how it 'ought' to work.

-- 
Joe Cooper <joe@swelltech.com>
Web caching appliances and support.
http://www.swelltech.com
Received on Sat May 25 2002 - 18:50:02 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:30 MST