## Maintenance

To optimise page generation time Piwigo uses cached information. For example, instead of counting the number of photos contained in each album at each page reload this information is stored in the database. In theory this information should always be correct but sometimes an error can occur and cached information becomes out of date.

Some information becomes less useful as time goes by. Deleting this useless information from the database will save you some disk space.

- Delete orphan tags

- Update albums informations: For each album, the following information is checked, and updated if necessary : list of parent albums, number of photos, last photo date, position among brother albums, position among all albums. This action also checks the representative photos consistency.
- Update photos information: For each photo, information updated is : full path to file, average rate. Warning, do not mix up: metadata information must be synchronised from Administration » Tools » synchronise, or on the modification screen of a single photo (through Photo for example).

- Repair and optimise the database:Perform re-order, repair and optimise operations on each table of the database.
- Reinitialize integrity check

- Purge history details: Delete all lines from the history table. Screen Administration » Tools » History will not longer show information for the past history. Warning: all data will be lost, without any way to get them back.
- Purge history summary: Delete all the summary information about visit history. This summary is calculated from the history details.
- Purge sessions: Delete expired user sessions.
- Purge never used notification feeds
- Purge searches history
- Purge compiled templates