En:How does phpCMS decide, which methode of caching to apply?

From phpCMS

Jump to: navigation, search

Question: How does phpCMS decide, which methode of caching to apply?

Answer:

phpCMS knows two different caching methods: static and dynamic caching (and, as a third alternative, no caching at all):

  1. If a page contains no plugins or only static ones ({PLUGIN FILE="..." TYPE="STATIC"}) and no built-in scripts or PAX code blocks, and if caching is activated in the admin GUI, phpCMS will cache the file staticly. This means that the page will be saved to the cache as complete, ready-to-deliver HTML code.
  2. If a file contains at least one dynamic plugin ({PLUGIN FILE="..." TYPE="DYNAMIC"}), the page is not cached at all and has to be recreated on each request. Therefore, dynamic plugins should only be used in very rare cases - usually a script is more appropriate.
  3. If a page contains a script or PAX code, it gets cached dynamically. phpCMS builds the page completely, just leaving out the script content. If the page is requested later on, only the used script (or the PAX code) is called, its content inserted and the result delivered.

Thus, phpCMS has to do different things for pages cached differently:

  1. static caching: Read a static HTML file and send it to the user (fastest method)
  2. dynamic caching: Take a prepared, static HTML file, execute embedded scripts and PAX code blocks and insert the results at the right position. If gzip compression is activated, the file gets compressed before being delivered to the user.
  3. no caching: phpCMS reads the content file, project file, menu file, template file(s) and menu template(s) and builds the page. Embedded dynamic plugins are run and can change the built page code. Afterwards, embedded scripts and PAX blocks will be executed (see 'dynamic caching'). All in all, this is (obviously) the slowest method.

Ignatius

Diese Seite in anderen Sprachen: Deutsch

Main Page: FAQ MainPage | Top Page: English FAQ MainPage

Personal tools