Index: main/plugin-web/src/org/ametys/web/inputdata/InputData.java =================================================================== --- main/plugin-web/src/org/ametys/web/inputdata/InputData.java (revision 33486) +++ main/plugin-web/src/org/ametys/web/inputdata/InputData.java (working copy) @@ -19,6 +19,7 @@ import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; +import org.ametys.web.cache.pageelement.PageElementCache; import org.ametys.web.repository.page.Page; import org.ametys.web.repository.site.Site; @@ -36,6 +37,16 @@ public boolean isCacheable(Site site, Page page); /** + * Returns true if the resulting SAX events should be actually stored in the central {@link PageElementCache}.
+ * It may be useful to return false for some InputData managing their own cache and don't wanting to waste space in the central cache.
+ * This method is only called if {@link #isCacheable(Site, Page)} returns true. + * @param site the current {@link Site}. + * @param page the current {@link Page}. Can be null. + * @return true if the content is cacheable and should be stored in the {@link PageElementCache}. + */ + public boolean shouldBeCached(Site site, Page page); + + /** * Generates SAX events for providing data. * @param handler the content handler to SAX into. * @throws SAXException if an error occurs while SAXing.