(I am reposting this from the spinoffs list by request from the only
response received there)
It seems to me that as AJAX applications mature and become more
many Prototype deployments will require some sort of caching layer.
some would say that caching belongs outside of Prototype, however I
that putting it inside deserves consideration for the following
1. More and more projects will require caching functionality
2. The functionality wouldn't require much code.
3. HTTP header values in server responses could potentially be useful
in standard web apps) to control client-side cache expiration (see
CacheableUpdater below). Furthermore I suspect that implementing
externally as a wrapper for Prototype would preclude the use of these
Therefore I think extending the Prototype library with caching support
worthy of consideration.
To illustrate, something like a couple of alternative methods to
Ajax.Updater could be implemented...
Ajax.SingleUpdater - Fetches the URL once, then returns the same
subsequent calls with the same URL.
Ajax.CacheableUpdater - Respects standard HTTP 'Expires' / 'Pragma'
when deciding whether to re-issue an HTTP request or return the last
PS: AFAIK the list past posts only have one ruby code snippet related
caching, nothing language-agnostic at the Prototype/JS level... as it
happens we use PHP (our app needs strong unicode support, including
PPS: For those interested, our usage scenario is as follows.
The app we are currently developing a lot of input fields are both
multilingual and of an arbitrary number. We are using dynamic,
have MANY such fieldsets on our pages.
Therefore loading the (long) list of languages via Prototype only
re-using it, would be an excellent optimisation for a) initial page
At present, with 'pure' Prototype Ajax.Updater re-issues the HTTP
each time an instance of a multilingual field is created.
Sure, we could implement a once-off caching solution, but shouldn't
more generic problem be solved closer to home in Prototype?
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at