You are here: Foswiki>Tasks Web>Item11436 (11 Apr 2012, GeorgeClark)Edit Attach

Item11436: HtpasswdUser creates a cache, make it a global cache

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Engine
Component:
Branches: Release01x01 trunk
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
HtPasswdUser caches the contents of the htpasswd file into a local variable that is released for every transaction. The cache is valuable, especially for rest applications. view of a topic like JQueryAjaxHelper hits the PasswordManager 20-30 times.

As long as the code goes to the effort of creating a cache, it might as well be a global cache so that in FCGI / mod_perl environments, the file is only read during initialization, and after password changes instead of once for each transaction.

The only time to not enable the global cache:
  • It adds no value unless you are running FCGI. FastCGI or mod_perl
  • If you are sharing a single foswiki with multiple virtual hosts, the cache should remain per session instead of global.

See Tasks.Item11409 for related changes.

-- GeorgeClark - 11 Jan 2012

Hi George, is it okay if I cherry-pick your commit over to trunk for UnitTestContrib?

-- PaulHarvey - 19 Jan 2012
 
Topic revision: r10 - 11 Apr 2012, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy