Perma-Cache Folder Structure Explained

To achieve cache vary based on the Vary Cache settings, Perma-Cache uses a special directory and file structure. It was designed to be easily readable while providing the capabilities needed by the system to differentiate between different vary settings of each file. This article explains the structure of how the files are stored within a storage zone.

Root Folder

By default, the Perma-Cache can be stored in any storage zone and uses the folder:

This folder is used by every pull zone that uses this storage zone for Perma-Cache.


Pull Zone Folder

The next branch in the directory tree is the Pull Zone directory:

It consists of the Pull Zone name and a unique caching ID unique_id. Whenever a full zone cache purge is performed, the unique_id will increase and a new folder will be used for this zone.


File Path

Next is the directory path to the requested URL. This matches the normal request path, however, it has normalization applied to combine multiple slashes into a single slash (// into /). For example:


File Name

Next is the directory with the name of the file enclosed in ___, for example:


File and Variations

Finally, this brings us to the last folder of the structure which contains the actual files depending on the variation. When no Vary settings are used, the file is provided simply as:

If the Vary cache settings are used, the variation is also appended as a MD5 hashed string or our internal caching keys. 



Putting it all together

A full example structure would then end up such as:



Table of Contents

Was this article helpful?
14 out of 15 found this helpful