[MAGNOLIA-509] Create Cache for entire Website Created: 28/Jul/05  Updated: 17/Mar/09  Resolved: 10/Aug/05

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: 2.1 Final
Fix Version/s: 2.1 Final

Type: New Feature Priority: Major
Reporter: Nicolas Modrzyk Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any


Attachments: File cache-path.tar.gz     File cachepatch-v2.tar.gz    
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

I've created a working CacheGeneratorServlet , that takes all the node available in the website, and then generate the cache for each node.
I found out that it was quite useful in production environment, when deploying the application.

This is beta quality I guess. It is working but there is no documentation. If I get some feedback on this I will finish it properly tomorrow, along with an interface similar to the other 'utility' servlets.



 Comments   
Comment by Nicolas Modrzyk [ 28/Jul/05 ]

The web.xml code is as follow:

<servlet>
<servlet-name>CacheServlet</servlet-name>
<servlet-class>
info.magnolia.cms.servlets.CacheGeneratorServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CacheServlet</servlet-name>
<url-pattern>/CacheServlet</url-pattern>
</servlet-mapping>

And the necessary classes are attached.

Comment by Nicolas Modrzyk [ 02/Aug/05 ]

Proper version of the CacheGenerator servlet ...
the web.xml changes are the same as before and are not included ...

Also, I've removed the implicit check for Server.isAdmin() in the two cache classes.
Reasons are:

  • this should be in the server configuration
  • most of the server requests are post requests, or requests with parameters that are not cached anyway
  • this could be reused afterwards to export the static content from the admin server.

I've seen the comments on using spiders to load sites, but then again, having the cache generated by an install script can save some great time when deploying the application on multiple places.

Comment by Philipp Bracher [ 03/Aug/05 ]

i commited the changes. i changed the servlet mapping to .magnolia/cash-reload

thanks

Generated at Mon Feb 12 03:18:08 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.