Which flex cache entry goes to which bucket(s) is determined by the cache directives set at the JSP whose output is cached. In particular, path information contained in the flex directive is explored. The scenario is as follows:
- If there are path information in the cache directives, the JSP output is cached in all buckets the path belongs to (i.e., buckets where the path itself or a root folder is configured for).
- If there is no path information in the cache directive, the JSP output is added to no bucket at all.
Path information is contained in multiple flex cache directives, e.g.,
container-element. But there are also directives that contain no path information, e.g.
always. For such, the Flex cache entries are added to no bucket at all and thus they are removed from the cache on each publish event.
You should keep in mind that the cache directives do not necessarily tell the dependencies of the JSPs output. Hence, be careful when using the Flex cache buckets. Even if the assumptions made are kind of conservative, you should know your JSPs when configuring the buckets.