[Pythonmac-SIG] appscript terminology caching #2
has
hengist.podd at virgin.net
Thu Oct 21 00:46:18 CEST 2004
Bob wrote:
>appscript can install the FBA into its package,
Fine with me. I'm not sure how to package it for distribution though
- AFAIK distutils isn't resource fork/creator code-friendly. Advice?
>start it on on demand and just leave it running.
This would work fine for scripting local apps; not sure about remote
apps though (remote application scripting depends on the remote
applications already being running). Is there a way to remotely start
ATS running on another machine? If not, manually/automatically
putting it in startup items and never quitting it is probably the
best solution.
>Perhaps it should have a time to live of a few hours, and the
>application terminologies probably should expire as well.
Notes: ATS's terminology cache is in-memory, so will always expire
when ATS is quit.
Question: what would be the benefits of limiting ATS's running time,
as opposed to just letting it run until system shutdown?
Own thoughts: the longer ATS stays alive, the more benefit is gained
from caching (good) though there's also more risk of the cache
growing stale (bad). Regarding automatic expiry of cache: ATS could
easily flush individual entries in the cache after [e.g.] 48 hours
even if the application itself stays permanently running.
Then again, periodically flushing the cache is probably a bit
hit-or-miss affair as far as keeping it in-sync with an application;
sure as guns users will update their apps precisely 30 minutes after
ATS last reset its cache and 25 minutes after they last scripted
those apps.:) Possible memory leaks aside, ATS also shouldn't impact
much on system memory since each cache entry is just a few KB. What
other advantages would there be to auto expiry of cache?
Another idea: would checking an application's creation/modification
date be a viable way to avoid the cache going bad when a newer
version of the app is installed in exactly the same location?
Thanks,
has
--
http://freespace.virgin.net/hamish.sanderson/
More information about the Pythonmac-SIG
mailing list