Search Imperva Community for
Hi Kostas,The default caching behavior is that we will adhere to the cache directives in the headers and cache only content that is designated as cacheable.If you want to cache only images, there are a couple different ways to accomplish this depending upon your site layout.Select the following cache mode under CDN > Cache Custom Caching Cache according to custom cache rules onlyRemember to click the Save Changes button at the top right.Within this same screen, scroll down and click Add Rule.This is where you must decide how you will identify images. As an example, if the images all reside in a directory named "images", then the filter would be: URL contains "^/images"Action: Cache ResourceTTL: (define how long we should cache the resource)Rule Name: (give the rule a name)and click Save.Note: This filter will cache anything resides in a URL path that "Starts with" "/images"
Another example rule would be: URL contains ".jpg$"".jpeg$";".gif$";".png$"
Action: Cache ResourceTTL: (define how long we should cache the resource)Rule Name: (give the rule a name)and click Save.This rule will cache images no matter in which directory they reside. However, you must define all image extensions that you would like to cache. In the example above, I have defined some of the most common image types.Note: This filter will cache anything that "Ends with" ".jpg .jpeg . gif .png"Cache Rules utilize the same filter mechanism and logic as IncapRules. I recently did a webinar over IncapRules. If you were unable to attend, I highly recommend reviewing it here:
or Contact Us
Copyright @ 2019 Imperva. All rights reserved