## Maintenance

To optimize 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 wrong.

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

- Unlinked photos: Display photos which are not associated to any virtual album.
- Files with the same name in more than one physical album: Display photos or files which are found with the same filename in several albums.

- 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 synchronized from Administration » Tools » Synchronize, or on the modification screen of a single photo (through Photo 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 » 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