Gallery is the php based Photo management application.
It is extensively using cache mechanism in server side to render the images and data quickly.
This server-side cache will be an head-ache when debugging the Gallery application after making any changes on it. i-e Gallery will show the previous result from cache, it won't reflect the latest code/data/image change.
In this situation we need to clear the Gallery cache.
Find below the steps for clearing Gallery Cache.
Go to below url from your browser
(Remember to replace the domain.com with your actual domain)
Enter the Gallery setup password and click "Verify me".
The "Gallery Support" page will be displayed.
In the above page click on "cache maintenance"
Clicking "Clear Cache" on the above Cache Maintenance screen will clear the Gallery Cache.
Clear the "Derivative" only when it is really required.