Cache/nl: Difference between revisions
From Joomla! Documentation
Created page with "==Caching motoren of opslagplaatsen== *'''Configuratie"': Global Config->Cache Hier kunt u kiezen welk systeem u wilt gebruiken uw site voor alle cachegeheugens. De huidige op..." |
Created page with "=Voor Ontwikkelaars,= De klasse "'JCache"' maakt het mogelijk veel verschillende soorten en niveaus van caching. De volgende sub-klassen zijn speciaal gemaakt, maar u kunt uw..." |
||
| Line 31: | Line 31: | ||
APC, bijvoorbeeld, slaat ook uw php opcode (operationele code) op. | APC, bijvoorbeeld, slaat ook uw php opcode (operationele code) op. | ||
= | =Voor Ontwikkelaars,= | ||
De klasse "'JCache"' maakt het mogelijk veel verschillende soorten en niveaus van caching. De volgende sub-klassen zijn speciaal gemaakt, maar u kunt uw eigen toevoegen, of gebruik het hoofdcache op een van de verschillende manieren. | |||
Don't forget that the first level of cache encountered, will override any deeper caching. I suppose that too many levels is also counterproductive (''to be verified though''). | Don't forget that the first level of cache encountered, will override any deeper caching. I suppose that too many levels is also counterproductive (''to be verified though''). | ||
Revision as of 12:16, 25 June 2016
This article is tagged because it NEEDS REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.
More pages that need help similar to this one are here. NOTE-If you feel the need is satistified, please remove this notice.
- Joomla heeft verschillende manieren om "dingen" te cachen. Hier is een overzicht voor administrators en ontwikkelaars voor wat, waar en wanneer.
Voor beheerders
Een Joomla! beheerder kan gebruik maken van de volgende caches en opties:
Pagina caching
- Configuratie: Ingebouwde plugin (Extensies -> Plugins -> System - Cache)
- Caches: elke pagina van uw website
- Gebaseerd op: URL
- Meer informatie:
- Optionele browser caching: Cached ook op de browser/computer van je bezoeker
- Alleen pagina caches voor gasten (niet voor ingelogde bezoekers)
View caching
- Configuration: Global Config->Cache
- Caches: each view of a component
- Based on: URL, view, parameters, ...
- More info: Component developers have to include this in their code to work. Mostly this is not done. The Joomla main content component uses this, but only for guest visitors of your site though this is not obligated for every component.
Module Caching
- Configuratie"': Global Config->Cache
- Caches"': elke module (individueel aangepast via elke module's Geavanceerde Parameters)
- Gebaseerd op: ?
- Meer info: Je moet het uitschakelen op sommige modules om problemen te voorkomen
Verder Caching
Als u wilt om te controleren andere cache systemen en mogelijkheden, je dient de cache instellingen in extensies van derden te controleren
Caching motoren of opslagplaatsen
- Configuratie"': Global Config->Cache
Hier kunt u kiezen welk systeem u wilt gebruiken uw site voor alle cachegeheugens. De huidige opties zijn: APC, Eaccelorator, Bestand, Memcache, Redis, XCache.
APC, bijvoorbeeld, slaat ook uw php opcode (operationele code) op.
Voor Ontwikkelaars,
De klasse "'JCache"' maakt het mogelijk veel verschillende soorten en niveaus van caching. De volgende sub-klassen zijn speciaal gemaakt, maar u kunt uw eigen toevoegen, of gebruik het hoofdcache op een van de verschillende manieren.
Don't forget that the first level of cache encountered, will override any deeper caching. I suppose that too many levels is also counterproductive (to be verified though).
- JCacheView caches and returns the output of a given view (in MVC). A cache id is automatically generated from the URI, specific view and its specific method, or you can give your own.
This can automatically be done via the base controller's display function. For example in the controller of your component:
class DeliciousController extends JController {
function display() {
parent::display(true); //true asks for caching.
}
}
There are also some urlparams to consider. Check this "joomla stack"
Also, be aware that any updates (such as hits or visit counts) will NOT be updated (unless you add this outside this method and thus any deeper MVC-part.)
- JCachePage caches and returns the body of the page.
- JCacheCallback caches and returns the output and results of functions or methods.
If you want to cache queries, this is a good class for it, as illustrated here: Using caching to speed up your code
- JCacheOutput caches and returns output.
This is rather meant for caching a specific part of php code. It acts like an output buffer, but cached. <headertabs/>