Form Caches: Difference between revisions
No edit summary |
|||
Line 29: | Line 29: | ||
If an existing cache command is running or has run recently you can force the generation to ignore the last cache time and use cacheAllForce instead of cacheAll or forceCreateCache instead of createCache. | If an existing cache command is running or has run recently you can force the generation to ignore the last cache time and use cacheAllForce instead of cacheAll or forceCreateCache instead of createCache. | ||
Note that when running commands like this from the command line you may need to clear the APC so that configuration variables can be updated from the database. You can also restart Apache to do this. | |||
[[Category: Technical Overview]] | [[Category: Technical Overview]] |
Revision as of 15:30, 11 January 2010
The data for a form XXXXX may be cached into a table hippo_XXXXX. This hippo table can be used for:
- To generate reports to Custom Reporting
- To export data for decentralized data management
Hippo Table Structure
If a form XXXXX has a field YYYYY then the hippo_XXXXX table will have a column `XXXXX+YYYYY.` There is also a column `XXXXX+id` containing the id of the form and a column `XXXXX+parent` containing the parent form, if any.
Cache Times
The hippo tables are generated by a background process once a form cache is consider stale. The background process is spawned by default every 10 minutes. This can be specified by setting the value in magic data at:
- /modules/CachedForms/times/background_time
The stale time for a report defaults to 10 minutes. This can be over-ridden by the following setting values in magic data:
- /modules/CachedForms/times/stale
- /modules/CachedForms/times/stale_time_by_storage/ZZZZZ
- /modules/CachedForms/times/stale_time_by_form/XXXXX
where ZZZZZ is the storage mechanism that form XXXXX uses.
The background process will, in general, only update changed forms in the hippo_XXXXX table. However, once a certain amount of time (one day by default) has passed, the hippo_XXXXX table is completely dropped and rebuilt. You can change this time by specifying the value at
- /modules/CachedForms/times/recache_time
Command Line
If you want to erase all your existing caches, run this command from your site pages directory.
php index.php --page=/CachedForms/dropAll --nocheck=1
To manually run all the form caches you can run this from the command line in your site pages directory.
php index.php --page=/CachedForms/cacheAll --nocheck=1
To drop and/or add a cache for a specific form $form run these commands from the your site pages directory.
php index.php --page=/CachedForms/dropCache/$form php index.php --page=/CachedForms/createCache/$form
If an existing cache command is running or has run recently you can force the generation to ignore the last cache time and use cacheAllForce instead of cacheAll or forceCreateCache instead of createCache.
Note that when running commands like this from the command line you may need to clear the APC so that configuration variables can be updated from the database. You can also restart Apache to do this.