## Maintenance

To optimize page generation time, Piwigo uses cached information. For example, instead of counting the number of pictures contained in each category 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 wrong.

Some information become useless with time going by. Deleting this useless information from database make you save disk space.

- Unlinked elements: Display images which are not associated to any virtual category.
- Files with the same name in more than one physical category: Display images or files which are found with the same filename in several categories.

- Update categories informations: For each category, the following information is checked, and updated if necessary : list of parent categories, number of pictures, last picture date, position among brother categories, position among all categories. This action also checks the representative picture consistency.
- Update images information: For each picture, information updated is : full path to file, average rate. Warning, do not mix up: metadata information must be synchronized from Administration, Categories, Synchronize, or on the modification screen of a single picture (through Picture for example).
- Repair and optimize the database: Perform re-order, repair and optimize operations on each table of the database.

- Purge history details: Delete all lines from the `history` table. Screen Administration, Specials, 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