David Corbin wrote:> As I recall, in Java Servlets, there data can be cached at four levels
based
> on life-span. Page, Request, Session and Application. The latter being
> shared amongst all sessions (i.e., essentially a singleton).
>
> Is there any such concept as the Application cache directly supported in
> Rails, or is it a case of using a global (ugh) variable?
See the "Rails on JRuby" thread for further discussion.
There is no Application state in Rails. Global variables do not apply;
they are only available to a single instance of a request handler (be it
CGI, Apache mod_ruby, or FastCGI.)
Your best bet (if you truly need global application state; most don''t)
is memcached.
jeremy