generate static html cache for pages.

Generate static html cache for pages., a forum discussion on Jojo CMS. Join us for more discussions on Generate static html cache for pages. on our Suggestions & Feedback forum.

Back to Forum Index : Back to Suggestions & Feedback   RSS
dennyhalim

10 Apr 2009
Posts: 44

usually, most of us...
setup pages once and very rarely edit it.

so, imho, it make great sense if we can create static html cache for pages.

instead of using mysites/cache, it's better generate static html at htdocs/html and redirect all pages request to the static html.

the cache is removed/updated when we edit our pages.

and let alone the cache at mysites/cache for articles which regularly updated

tia
tnx for great free jojocms
tom

Developer

tom

10 Apr 2009
Posts: 379

mm. most of our sites, even if the page content itself changes rarely, use sidebars to display random article/event/profile snippets, so caching these as html wouldn't make much sense.
Harvey

Core Developer

Harvey

10 Apr 2009
Posts: 327

If you enable the Jojo content cache it does something similar to this. The page cache is kept in the database, and is retrieved very quickly compared to regenerating the page.
This system is ok - one thing it does do is keep a different cache for each logged-in user to accommodate any user-specific content. We don't want to be caching admin content for any user to see etc.

The main thing wrong with caching in htdocs is that it requires write access in the web root folder - something we have worked really hard to avoid. Not having any writable files in your htdocs area makes the system a lot safer.

I'm currently working on a better caching system for images, CSS and Javascript files, this will be released soon and should make a much-needed boost to performance.
Harvey

Core Developer

Harvey

10 Apr 2009
Posts: 327

I usually cache those sidebar snippets - if they are randomly generated on each page, the user is going to see different snippets as they move through the site regardless of whether the snippets are cached.

I only turn off caching when public users get to see content that is generated based on cookies, or IP to country data, or a live XML feed etc.
dennyhalim

14 Apr 2009
Posts: 44

i'm no security expert...
but, i think caching static html in htdocs will not be big security issue.
especially if we remove the executeable bit.
so that no scripts can be executed inside the folder. everything is only static html.

for sidebar article, can be less frequently updated.
perhaps every few hours or even days, the cache is updated by cron or other ways.
or update the cache when we post new articles.
or another way... (but it's against seo) is using javascript to update the news.

this way we can have really lightning fast web that serve static html.

tnx for great free jojocms
Back to Forum Index : Back to Suggestions & Feedback   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.