NP_Cache - static pages for Nucleus CMS

MyEgo.cz

home foto blogy mywindows.cz kontakt

NP_Cache - static pages for Nucleus CMS

Fast!

NP_Cache is a new plugin for Nucleus CMS, compatible with version Nucleus 2.0 and above, including its standard, eXtreme Edition, and Light Edition distributions. It creates static pages real-time, automatically, refreshes them as needed. It also calculates some statistics as well. It is based on Cache_Lite PHP class.

Without this plugin, it takes about 0.2 seconds to create a homepage of this blog. With this plugin installed, it takes only 0.0007 seconds! Quite a difference ;)

NP_Cache will cache following Nucleus pages and keep them updated as needed:

  • index page.
  • item pages.
  • archivelist pages.
  • archive pages.
  • member pages.

In plugin options, you can setup cache lifetime in minutes (30 minutes by default), and directory (relative to MEDIA_DIR) where cached pages will be stored. This directory must have write-access enabled for PHP script (chmod 777).

The plugin also subscribes to UpdateItem, AddItem, DeleteItem, UpdateComment, AddComment, and DeleteComment events to clear the cache for a specific item. It also subscribes to AddCategory, DeleteCategory, and DeleteBlog events.

Using plugin options, you can also force the whole cache to be cleaned immediately.

NP_Cache is compatible with normal URLs, fancy URLs, and FancierURLs as well.

You can also use two skin variables, CACHE _PARSE_TIME (no spaces inside) which will display the time in seconds it took to produce the page, and CACHE _CREATED_TIME (no spaces inside) which will display when the page was created.

Example (no spaces inside keywords):

<p>
  it took: CACHE _PARSE_TIME 
  seconds to create this page
  | 
  created at:
  CACHE _CREATED_TIME
 </p>

Download at: https://myego.cz/other/NP_Cache.zip (8kB).

When using NP_Cache, please uninstall NP_GZip plugin, it is NOT compatible with NP_Cache (as NP_Cache fully takes over GZip functionality).


Komentáře

  1. 1 moraes 28.05.04, 06:05:06
    FB

    Plugin-Of-The-Year winner! :D