Form Caches: Difference between revisions

From IHRIS Wiki
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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 índicesEstos cachés se utilizan, por ejemplo, para llenar informes y listas.
The iHRIS software caches data saved in the database (or XML file or LDAP server) for faster access and the ability to create indicesThese caches are used, for example, to populate reports and drop-down lists.




A los datos para un formulario ''XXXXX'' se les puede haber realizado caché en una ''hippo_XXXXX.''  Esta tabla hippo puede utilizarse para:
The data for a form ''XXXXX'' may be cached into a table ''hippo_XXXXX.''  This hippo table can be used for:
*Generar informes para [[Custom Reporting -- An Overview | Custom Reporting]]
*To generate reports to [[Custom Reporting -- An Overview | Custom Reporting]]
*Exportar datos para [[Managing Decentralized iHRIS Manage with Launchpad|decentralized data management]]
*To export data for [[Managing Decentralized iHRIS Manage with Launchpad|decentralized data management]]
==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.
==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 and Command Line==
 
The hippo tables are generated by a background process once a form cache is consider stale. See the [[Configuring Form Cache Generation Timing]] document for information on timing for form caches and information on manually creating the form caches from the command line.


To see this tutorial for different versions of the software see the following:{{otherversions|Exporting and Updating Form Caches Using Profiles}}
To see this tutorial for different versions of the software see the following:{{otherversions|Exporting and Updating Form Caches Using Profiles}}


=Editar, Exportar y Actualizar los Cachés de Formularios Utilizando Perfiles=
=Editing, Exporting and Updating Form Caches Using Profiles=


En la versión '''4.0.6''' agregamos la habilidad de crear ''perfiles'' de cachés de formulariosUn perfíl es simplemente una lista de formularios que puede usar para reaizar las siguientes acciones rapidamente:
In version '''4.0.6''' we add the ability to create ''profiles'' of form cachesA profile is a simply a list of forms that you can use to rapidly:
*[[#Updating the Cache of a Profile|Actualizar]] el caché para cada formulario en el perfíl
*[[#Updating the Cache of a Profile|Update]] the cache for each of the forms in the profile
*[[#Exporting the Cache of a Profile|Exportar]] el caché, por medio de mysqldump, para cada formulario del perfíl. Esto esparticularmente útil para exportar datos de una oficina regional o de distrito al nivel nacional.
*[[#Exporting the Cache of a 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.


Esta funcionalidad es parte de los [[I2CE_Module_List#CachedForms  | Cached Forms modules]] y se puede tener acceso a la misma hacienda click en los links de '''Configure System''' y luego  '''Cached Forms'''
This functionality is part of the [[I2CE_Module_List#CachedForms  | Cached Forms modules]] and can be accessed by clicking on the links for '''Configure System''' and then '''Cached Forms'''


==Crear un Perfíl==
==Creating A Profile==
El primer paso es crear un ''perfíl'' de los formularios. Un perfíl es una lista de formularios con un nombre corto que puede usar para ayudarle a identificar la lista.   
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.   




#Busque en  '''Create/Edit Profile''' en la página ''Cached Forms'' . Aquí asegúrese de que "Create a new profile" este seleccionado en la lista y luego haga click en el botón "Edit".
#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.
#Ahora escriba un nombre para el perfíl. Es major escoger un nombre corto con signos de puntuación limitados como "nightly_update"
#Now type a name for the profile. It is best to keep it short with limited punctuation such as "nightly_update"
#Ahora seleccione cada uno de los formularios que desea incluir en el perfíl
#Now select each of the forms you wish to include in the profile
#Finalmente, haga click en el botón "Submit" al final de la página
#Finally, click the "Submit" button at the bottom of the page


==Actualizar el Caché de un Perfíl==
==Updating the Cache of a Profile==
Puede actualizar todas los formularios en un perfíl bajo '''Cache Forms''' en la página ''Cached Forms''.
You can update all of the forms in a profile under '''Cache Forms''' on the ''Cached Forms'' page.


#Escoja el perfil para el cual quiere realizer caché de los formularios
#Choose the profile for which you wish to cache forms
#Haga click en el botón "Cache"
#Click the "Cache" button


==Exportar el Caché de un Perfíl==
==Exporting the Cache of a Profile==


Hay dos usos principals de la exportación de todos los formularios en un perfíl, puede obtener todos los datos, o solamente hacer modificaciones a los datos desde la última fecha. Se puede tener acceso a ambos bajo '''Export Cached Forms''' en la página ''Cached Forms'' .
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.


#Escoja el perfil que desea exportar
#Choose the profile you wish to export
#Escoja si desea activar compresión bzip2 o no
#Choose to enable bzip2 compression or not
#Ocionalmente seleccione la hora de modificación.
#Optionally select the modification time.
##Si no establece la hora de modificación, obtendrá todos los datos de los formlarios. El mysqldump incluirá afirmaciones de "DROP TABLE IF EXISTS" y "CREATE" para cada tabla hippo_XXXX .  Los datos se llenan por medio de las afirmaciones "INSERT"  
##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 tablesData is populated via "INSERT" statements
##Si no establece la hora de modificación, obtendrá todos los datos de los formularios. EL mysqldump no incluirá la afirmación "DROP TABLE IF EXISTS" '''ni'' la "CREATE" para cada tabla hippo_XXXX .  Los datos se llenan por medio de las afirmaciones "REPLACE" .
##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 tablesData is populated via "REPLACE" statements.
#haga click el botón "Export"  
#click the "Export" button


'''Nota:''' Cuando exporte el caché, no lo actualiza primero. Deberá hacer esto manualmente.
'''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==
==Crontab and Command Line Interaction==
Por ejemplo, usted podría desear poner una actualización en el perfil "nightly_update"  en su crontab:
For example, you may wish to put an update of the profile "nightly_update"  in your crontab:
   30    1    *    *    *        /usr/bin/php /var/www/ihris-manage/index.php --page=/CachedForms/cache --get=profile=nightly_update
   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:
will cause all forms in the 'nightly_update' profile to be update at 1:30am. Putting:
   10    *    *    *    *        /usr/bin/php /var/www/ihris-manage/index.php --page=/CachedForms/cache --get=profile=hourly_update
   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.
in your profile will update every form in the 'hourly_update' profile at ten minutes past the hour.


[[Category: Technical Overview]][[Category:Forms]][[Category:Review2013]][[Category:Needs Intro]]
[[Category:Developer Resources]]

Latest revision as of 19:05, 1 March 2019

The iHRIS software caches data saved in the database (or XML file or LDAP server) for faster access and the ability to create indices. These caches are used, for example, to populate reports and drop-down lists.


The data for a form XXXXX may be cached into a table hippo_XXXXX. This hippo table can be used for:

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 and Command Line

The hippo tables are generated by a background process once a form cache is consider stale. See the Configuring Form Cache Generation Timing document for information on timing for form caches and information on manually creating the form caches from the command line.

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

Updating the Cache of a Profile

You can update all of the forms in a profile under Cache Forms on the Cached Forms page.

  1. Choose the profile for which you wish to cache forms
  2. Click the "Cache" button

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.

Crontab and Command Line Interaction

For example, you may wish to put an update of the profile "nightly_update" in your crontab:

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

will cause all forms in the 'nightly_update' profile to be update at 1:30am. Putting:

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

in your profile will update every form in the 'hourly_update' profile at ten minutes past the hour.