diff --git a/src/fr/devinsy/kiss4web/HtmlCache.java b/src/fr/devinsy/kiss4web/HtmlCache.java new file mode 100644 index 0000000..20151e2 --- /dev/null +++ b/src/fr/devinsy/kiss4web/HtmlCache.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Christian Pierre MOMON + * + * This file is part of Kiss4web. + * + * Kiss4web is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Kiss4web is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Kiss4web. If not, see + */ +package fr.devinsy.kiss4web; + +import java.util.HashMap; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * The Class HtmlCache. + */ +public class HtmlCache extends HashMap +{ + private static final long serialVersionUID = -310354977854681838L; + private static Logger logger = LoggerFactory.getLogger(HtmlCache.class); + + /** + * Instantiates a new html cache. + */ + public HtmlCache() + { + super(); + } + + /** + * Gets the. + * + * @param get + * the get + * @return the string + */ + public String get(final String key) + { + String result; + + if (key == null) + { + result = null; + } + else + { + result = super.get(key); + + if (result != null) + { + logger.info("HTML Cache matched: [{}]", key); + } + } + + // + return result; + } +}