We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You must opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>SetMaxCacheAgeToInfinite (14 Feb 2008, MichaelDaum)
Tags:
create new tag
, view all tags

Question

Relative to the LdapContrib Plugin, how do we default the “$TWiki::cfg{Ldap}{MaxCacheAge}” value to infinite, so that it never updates the cache. This value is under ‘Performance settings’ (Maximum time a cache is kept; default is 86400 seconds)

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: LdapContrib v2.99.3
Server OS: Red Hat Enterprise Linux 4.0
Web server: Apache 3
Perl version: 5.0XX
Client OS: MS Windows XP
Web Browser: IE
Categories: Authentication, Performance, Contributing code, Plugins

-- ShivaGoudarzi - 12 Feb 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

To disable automatic cache aging you have to set it to 0:

$TWiki::cfg{Ldap}{MaxCacheAge} = 0;

-- MartinKaufmann - 12 Feb 2008

That is exactly what we have set; unfortunately, it is not having the desired effect.

-- ShivaGoudarzi - 12 Feb 2008

So even after setting your MaxCacheAge to 0, your cache is still updated daily? Which TWiki version and LdapContrib version are you using?

-- MartinKaufmann - 13 Feb 2008

We are using TWiki v4.2.0 and LdapContrib v2.99.3; and yes, our cache updates daily, and at random times, despite our setting the MaxCacheAge to 0.

-- ShivaGoudarzi - 13 Feb 2008

I don't know enough about LdapContrib internals (to be honest, I don't know anything at all...) but it might be best to raise a bug.

If you just want to make sure that the cache is never updated automatically and don't mind hacking the perl code, just uncomment the following line (should be about line 568) of lib/TWiki/Contrib/LdapContrib.pm:

$this->refreshCache();

-- MartinKaufmann - 14 Feb 2008

I can confirm this bug. Filed as Bugs:Item5365, also reported at DisableLdapContribBuildingOfOwnCache. Will be fixed in next release.

-- MichaelDaum - 14 Feb 2008

Fixed in latest release 2.99.4

-- MichaelDaum - 14 Feb 2008

 
Change status to:
Topic revision: r7 - 14 Feb 2008 - 10:35:05 - MichaelDaum
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback