Charles Haynes
Member
pageCache 1.1
What is it?
A drop-in replacement for visit_url that implements a simple LRU cache.
Script developers can use visit_cached_url(string) instead of visit_url(string).
Note: Depends on zarqon's excellent zlib.ash and my log_lib.ash make sure you install them first.
For Users
Should be transparent to end users, but see Issues
For Script Authors
Currently caches four pages, and invalidates pages not from the current day and turn. All of these are tunable via variables in the start of the script.
Methods
string visit_cached_url(string url)
Issues
Does not invalidate cache if you change users (but is only an issue if you have two users on the same turncount)
Does not invalidate quest pages if you visit the guild to complete or start a quest (because that doesn't use a turn.)
Change Log
1.0 2009/11/18 Initial release
1.1 2009/11/20 Check "lastCouncilVisit" to invalidate cache if you visit the council
What is it?
A drop-in replacement for visit_url that implements a simple LRU cache.
Script developers can use visit_cached_url(string) instead of visit_url(string).
Note: Depends on zarqon's excellent zlib.ash and my log_lib.ash make sure you install them first.
For Users
Should be transparent to end users, but see Issues
For Script Authors
Currently caches four pages, and invalidates pages not from the current day and turn. All of these are tunable via variables in the start of the script.
Methods
string visit_cached_url(string url)
Issues
Does not invalidate cache if you change users (but is only an issue if you have two users on the same turncount)
Does not invalidate quest pages if you visit the guild to complete or start a quest (because that doesn't use a turn.)
Change Log
1.0 2009/11/18 Initial release
1.1 2009/11/20 Check "lastCouncilVisit" to invalidate cache if you visit the council
Attachments
Last edited: