Caching files in the /files directory
Permalink
I have recently ported a site over to concrete5. The site contains quite a few javascript files that create google maps in conjunction with photogalleries (there are well over 100 galleries). The photogalleries use xml files to define the names of the image files, captions, etc. To keep life simple I did not import the photo galleries into the concrete5 file manager but instead setup a directory under /files that contains subdirectories for each photogallery. Within the subdirectory are the photo gallery's image files and the applicable xml file. I then coded a block that runs the map/photogallery javascript, which in turn processes the proper xml file based on the page name and formats the gallery page.
The blocks work perfectly. Recently I started to work on optimizing the site. After reading various articles on concrete5 caching I am not sure if the images in the gallery are cached. I have cache settings set to:
Basic Cache: On
Override Cache: On
Full Page Caching: On in all cases
Full Page Cache Rebuild: Manual
Are the photo images cached in Concrete5 since they are used in conjunction with a block or do images need to be in the Concrete5 file manager in order to be cached?
A sample gallery page can be found at:
http://www.hikingwalking.com/destinations/co/co_sw/silverton/ice_la...
Thanks in advance for any clarity on this issue.
The blocks work perfectly. Recently I started to work on optimizing the site. After reading various articles on concrete5 caching I am not sure if the images in the gallery are cached. I have cache settings set to:
Basic Cache: On
Override Cache: On
Full Page Caching: On in all cases
Full Page Cache Rebuild: Manual
Are the photo images cached in Concrete5 since they are used in conjunction with a block or do images need to be in the Concrete5 file manager in order to be cached?
A sample gallery page can be found at:
http://www.hikingwalking.com/destinations/co/co_sw/silverton/ice_la...
Thanks in advance for any clarity on this issue.
There is two kinds of caching that you may be talking about:
The browser not re-requesting the image file everytime it loads the page. Regardless of how you've set up the block, c5, etc, this is set by your web server (in htaccess, probably) and depend on the headers sent.
The settings you describe have nothing to do with that type of caching. You're describing block caching. This would prevent having to re-run all the code that loads the xml file and renders the view. Typically, to support this, you'd have to specify that your custom-built block is cacheable (with a few properties). However, since you're got "full page caching: on in all cases", that setting is irrelevant; the block output (and thus all the work done to load the xml file, etc) gets cached.
The browser not re-requesting the image file everytime it loads the page. Regardless of how you've set up the block, c5, etc, this is set by your web server (in htaccess, probably) and depend on the headers sent.
The settings you describe have nothing to do with that type of caching. You're describing block caching. This would prevent having to re-run all the code that loads the xml file and renders the view. Typically, to support this, you'd have to specify that your custom-built block is cacheable (with a few properties). However, since you're got "full page caching: on in all cases", that setting is irrelevant; the block output (and thus all the work done to load the xml file, etc) gets cached.
Thank you for the clarification. I have browser caching on. It is nice to know that the block caching takes care of this issue.
Mike