XOAD_Cache Class.
This class allows you to cache the callbacks to the server. By default the caching is disabled and you must call XOAD_Cache::allowCaching to configure which classes and methods will be cached.
Example:
- <?php
- XOAD_Cache::allowCaching('ExampleClass', 'invokeMethod', 30);
- ?>
Located in /extensions/cache/classes/Cache.class.php (line 56)
Installs a new caching criteria.
By default the caching is disabled and you must call this method to configure which classes and methods will be cached.
If you call this method with no arguments, caching will be enabled for all classes and methods.
When generating the ID for each request the class name, method name and arguments list is used to build a long string which is later used for the ID. You can configure XOAD_Cache to include some of the class variables too.
Example:
- <?php
- // Allow caching for all classes.
- XOAD_Cache::allowCaching();
- // Allow caching only for the 'Example' class.
- XOAD_Cache::allowCaching('Example');
- // Allow caching only for the 'Example->invoke' method.
- XOAD_Cache::allowCaching('Example', 'invoke');
- // Allow caching for the 'invoke' method in every class.
- XOAD_Cache::allowCaching(null, 'invoke');
- ?>
This method is called when the request matches the configurated criterias for caching, but there is no data in the cache.
This method is called when the request matches the configurated criterias for caching.
If the request is cached and it's not expired then the cached response is used, otherwise the server dispatches the call and the response is cached.
Retrieves an instanse to the configurated XOAD_Cache storage provider.
This method is called on every request to the server.
If the request matches the configurated criterias for caching this method will call XOAD_Cache::dispatch.
Documentation generated on Sat, 12 Nov 2005 20:23:51 +0200 by phpDocumentor 1.3.0RC3