Package com.volantis.mcs.cache.css

Examples of com.volantis.mcs.cache.css.CSSCacheIdentity


        String base64Key = request.getParameter("key");
        if (logger.isDebugEnabled()) {
            logger.debug("Retrieving key " + base64Key;
        }
        if (base64Key != null) {
            CSSCacheIdentity identity = new CSSCacheIdentity(base64Key);
            if (logger.isDebugEnabled()) {
                logger.debug("Key createTime is  " + identity.getCreateTime());
                logger.debug("Key sequenceNo is  " + identity.getSequenceNo());
            }
            CSSCacheEntry entity = (CSSCacheEntry) cssCache.retrieve(identity);
            if (entity != null) {
                response.setContentType("text/css");

                // Set caching HTTP headers.
                long nowTime = System.currentTimeMillis();
                long createTime = identity.getCreateTime();
                long expiresTime = identity.getExpiresTime();
               
                // Calculate max-age, avoiding negative values.
                long maxAgeSeconds = Math.max ((expiresTime - nowTime) / 1000, 0);
                   
                // Set HTTP 1.1 headers
View Full Code Here

TOP

Related Classes of com.volantis.mcs.cache.css.CSSCacheIdentity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.