Extracted at 2014-06-26.
pike.ida.liu.se
[Top]
Tools
Tools.Mapping
Tools.Mapping.MappingCache

Method Tools.Mapping.MappingCache()->create()


Method create

void Tools.Mapping.MappingCache(int _timeout, void|int _cleanup_interval)

Parameter _timeout

specify the length of time (in seconds) an entry should be retained after it has been added. the timeout interval is not sliding: that is, accessing an entry will not cause the timeout counter to be reset for the entry. setting an entry will cause the timeout to be recalculated, though.

Parameter _cleanup_interval

specify how often the mapping should be examined for stale entries. by default the cleanup period will be twice the timeout. entries will always be removed if accessed after their timeout period; this interval is only used to remove entries which might not be accessed otherwise.