SUSE Manager/SUSEManagerProxyCaching

From MicroFocusInternationalWiki
Jump to: navigation, search

How SUSE Manager Proxy Cache data

squid configuration

size of cached objects

Only objects up to the given size are stored on disk. If you want to store bigger files, please adapt the limit but take care that your storage has enough space.

 maximum_object_size 200 MB


Metadata caching

These rules define caching of metadata.

 refresh_pattern /XMLRPC/GET-REQ/.*/repodata/.*$ 0 1% 1440 ignore-no-cache reload-into-ims refresh-ims
 refresh_pattern /rhn/manager/download/.*/repodata/.*$ 0 1% 1440 ignore-no-cache reload-into-ims refresh-ims

The three numbers are <minimal cache time in minutes> <percent> <maximal cache time in minutes>

   'Percent' is a percentage of the objects age (time since last
   modification age) an object without explicit expiry time
   will be considered fresh.

The calculation works like this:

"age": the age of the entry at check_time since last check "lastmod_delta": the difference between the last-modified date of the response and the time we cached it. It's how "old" the response was when we got it. "stale_age": lastmod_delta * 'percent';

if (age >= stale_age) => refresh it

When "max" is 1440 = 1 day, age cannot be more than a day

age: < 1 day lastmod_delta: 30 days

stale_age = 30 day * 1% (~ 7 hour)

In worst case you need to wait 7 hours if the last refresh just happened a minute before the channel changed.

"stale_age" increase when the content of a channel stay unchanged for longer times. With a 3 month patch cycle period we are near to the configured max time.

If this is not acceptable you can change the percent to "0%". This should disable caching at all.

RPM caching

Other content and especially RPMs are cached for a long time as they hardly never change.

   refresh_pattern  \.rpm$  10080 100% 525960 override-expire override-lastmod ignore-reload reload-into-ims
   refresh_pattern         .               0       100%    525960

Activate changes

After changing the squid configuration, tell squid to use the new values by issuing the command

   systemctl reload squid