Add a cache for thumbgen & code finalizing

Code finalizing: gallery/index.php
Add a cache for thumbgen minimize pictures
Update Version