gustafn
committed
on 24 Oct 13
- reimplementation of util_memoize cache for NaviServer. The original
implementation of the util-memoize functions was based on "manual ex… Show more
- reimplementation of util_memoize cache for NaviServer. The original

 implementation of the util-memoize functions was based on "manual expirations"

 (every cached entry was a pair of value + timestamp). This is not needed

 on naviserver, since NaviServer allows us to specify for every entry

 directly an expire time, which is implemented internally. The new

 has the advantage that (a) it is faster, (b) more secure (no race conditions),

 (c) smaller memory footprint (not only storing the timestamp is not needed;

 furthermore invalidation of timed-out entries happend in the old version only,

 when the entry was fetched; in practice (openacs.org) many dead entries

 where kept, the size wen down by 90%), (d) due to small number of entries

 the search in the keys is much faster.

Show less