RequestPolicy/requestpolicy — Issue #123: Caching of ALLOW/DENY result should not be time based
Author: jsamuel
Created: 2011-12-22 04:02:29+00:00
State: open
Labels: extension

Currently ALLOW/DENY results are cached based on a seemingly arbitrary time interval:

'''/components/requestpolicyService.js'''

{{{
/**
* Number of elapsed milliseconds from the time of the last shouldLoad() call
* at which the cached results of the last shouldLoad() call are discarded.
*
* @type Number
*/
_lastShouldLoadCheckTimeout : 200,
}}}

While the chosen interval is short, it does not preclude the possibility that the user may have changed policy in that interval.

Further, if a cache is warranted (and is secure), the cache should ONLY be invalidated IF policy changes (and perhaps if the user clears browser cache). This should also have the benefit of improving performance...