------------------------------------------------------------ revno: 13130 revision-id: squid3@treenet.co.nz-20140502074732-29lattbxenhwv1uf parent: squid3@treenet.co.nz-20140426105822-6kjdcqrkb1bnrg2c author: Anatoli committer: Amos Jeffries branch nick: 3.4 timestamp: Fri 2014-05-02 00:47:32 -0700 message: Fix order dependency between cache_dir and maximum_object_size parse_cachedir() has a call to update_maxobjsize() which limits the store_maxobjsize variable used as the internal maximum_object_size variable of the store data structure) to the value of maximum_object_size defined at the moment of execution of this function, for all stores (all store directories). So if parse for cache_dir is called before maximum_object_size, we get the effect of the default 4 MB. BUT, when we get to parse maximum_object_size line(s) after the last cache_dir, the maximum_object_size option is processed and only shown on the cachemgr config page without having updated store_maxobjsize. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140502074732-29lattbxenhwv1uf # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # testament_sha1: 41a6e09f256d3993f50e9e50e1eb9ff5473292de # timestamp: 2014-05-02 07:53:48 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # base_revision_id: squid3@treenet.co.nz-20140426105822-\ # 6kjdcqrkb1bnrg2c # # Begin patch === modified file 'src/cache_cf.cc' --- src/cache_cf.cc 2014-02-18 08:43:02 +0000 +++ src/cache_cf.cc 2014-05-02 07:47:32 +0000 @@ -723,6 +723,7 @@ #endif storeConfigure(); + update_maxobjsize(); // check for late maximum_object_size directive snprintf(ThisCache, sizeof(ThisCache), "%s (%s)", uniqueHostname(), === modified file 'src/cf.data.pre' --- src/cf.data.pre 2014-04-23 14:01:34 +0000 +++ src/cf.data.pre 2014-05-02 07:47:32 +0000 @@ -3358,9 +3358,7 @@ DEFAULT: 4 MB LOC: Config.Store.maxObjectSize DOC_START - Set the default value for max-size parameter on any cache_dir - which follow. - + Set the default value for max-size parameter on any cache_dir. The value is specified in bytes, and the default is 4 MB. If you wish to get a high BYTES hit ratio, you should probably @@ -3535,10 +3533,9 @@ max-size=n the maximum object size in bytes this cache_dir supports. - The value in maximum_object_size directive above - this cache_dir line sets a default unless more - specific details are available (ie a small store - capacity). + The value in maximum_object_size directive sets + the default unless more specific details are + available (ie a small store capacity). Note: To make optimal use of the max-size limits you should order the cache_dir lines with the smallest max-size value first.