Form Caches

From IHRIS Wiki

El software iHRIS realizá caché de los datos guardados en la base de datos (o archivo XML , o servidor LDAP) para tener acceso más rápido y la habilidad de crear índices. Estos cachés se utilizan, por ejemplo, para llenar informes y listas.


A los datos para un formulario XXXXX se les puede haber realizado caché en una hippo_XXXXX. Esta tabla hippo puede utilizarse para:

Estructura de la Tabla Hippo

Si un formulario XXXXX tiene un campo YYYYY entonces la tabla hippo_XXXXX tendrá una columna `XXXXX+YYYYY.` También hay una columna `XXXXX+id` que contiene la id del formulario y una columna `XXXXX+parent` que contiene el formulario primario, si lo hay.

Momentos de Caché y Línea de Comando

Las tablas hippo se generan mediante un proceso de fondo una vez que el caché de un formulario se considera obsoleto. Vea el documento Configuring Form Cache Generation Timing para mayor información en el momento para los cachés de formularios y acerca de la creación manual de los cachés de formularios desde la línea de comando.

To see this tutorial for different versions of the software see the following:


Editing, Exporting and Updating Form Caches Using Profiles

In version 4.0.6 we add the ability to create profiles of form caches. A profile is a simply a list of forms that you can use to rapidly:

  • Update the cache for each of the forms in the profile
  • Export the cache, via a mysqldump, for each of the forms in the profile. This is particularly useful for exporting data from a regional or district office to the national level.

This functionality is part of the Cached Forms modules and can be accessed by clicking on the links for Configure System and then Cached Forms

Creating A Profile

The first step is to create a profile of the forms. A profile is a list of forms with a short name that you can use to help you identify the list.


  1. Look under Create/Edit Profile on the Cached Forms page. Here make sure "Create a new profile" is selected in the drop-down, and then click the "Edit" button.
  2. Now type a name for the profile. It is best to keep it short with limited punctuation such as "nightly_update"
  3. Now select each of the forms you wish to include in the profile
  4. Finally, click the "Submit" button at the bottom of the page

Actualizar el Caché de un Perfíl

Puede actualizar todas los formularios en un perfíl bajo Cache Forms en la página Cached Forms.

  1. Escoja el perfil para el cual quiere realizer caché de los formularios
  2. Haga click en el botón "Cache"

Exporting the Cache of a Profile

There are two main usages of exporting all of the forms in profile, you can either get all the data, or only the modifications to the data since the last date. Both can be accessed under Export Cached Forms on the Cached Forms page.

  1. Choose the profile you wish to export
  2. Choose to enable bzip2 compression or not
  3. Optionally select the modification time.
    1. If you do not set the modification time, you will get all of the data for the forms. The mysqldump will include "DROP TABLE IF EXISTS" and "CREATE" statements for each of the hippo_XXXX tables. Data is populated via "INSERT" statements
    2. If you do not set the modification time, you will get all of the data for the forms. The mysqldump will include neither the "DROP TABLE IF EXISTS" nor the "CREATE" statement for each of the hippo_XXXX tables. Data is populated via "REPLACE" statements.
  4. click the "Export" button

Note: When you export the cache, it does not first update it. You will need to do this manually.

Interacción de la Línea de Comando y Crontab

Por ejemplo, usted podría desear poner una actualización en el perfil "nightly_update" en su crontab:

 30     1     *     *     *         /usr/bin/php /var/www/ihris-manage/index.php --page=/CachedForms/cache --get=profile=nightly_update

causará que todos los formularios en el perfil 'nightly_update' se actualicen a las 1:30am. Poniendo:

 10     *     *     *     *         /usr/bin/php /var/www/ihris-manage/index.php --page=/CachedForms/cache --get=profile=hourly_update

en su perfil actualizará cada formulario en el perfíl 'hourly_update' diez minutos después de la hora.