[PATCH] Bug 3686 - refactor the config options controlling max object size

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 05 Feb 2013 23:36:40 +1300

http://bugs.squid-cache.org/show_bug.cgi?id=3686

The maximum cached object size gets capped to the highest specified
max-size of any cache_dir, even if there is cache_dir available with no
max-size specified.

The solution:

Re-document the global as a default limit with cache_dir specific values
overriding it for that store. And re-implement it strictly as a default
only applied when a cache_dir has no explicit max-size setting.

After this patch:

- maximum_object_size is converted into the default value for cache_dir
max-size= options when none is supplied.

- every cache_dir will always produce a max size for that storage area.
This is accessible as StoreDir::maxObjectSize().

- no cache_dir may be configured with a larger max-size= than will fit
in that storage area.

- cache_dir may be configured with max-size=0 which will result in no
new additions being made, *as well* as any form of revalidation purging
existing entries as they are detected to be "too big" for the area.
   NP: use no-store option to make a cache_dir read-only without this
purging behaviour.

- Squid will not cache any object larger than the *largest* storage
maximum (including memory cache maximum_object_size_in_memory). This is
currently accessible as store_maxobjsize.

  - if no cache_dir are specified, the largest cached object will be
limited by maximum_object_size_in_memory.

Amos

Received on Tue Feb 05 2013 - 10:36:56 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 06 2013 - 12:00:05 MST