Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Code Block
xml
xml
titleportlet.xmlxml
...
        <expiration-cache>600</expiration-cache>
        <cache-scope>private</cache-scope>
...
Code Block
java
java
titleCensusCollectView.javajava
...
        if (request.getETag() != null) {
            System.out.println("Expiration Tag is: "+request.getETag());
            if (request.getETag().equals(currentCacheTag)) {
                response.getCacheControl().setExpirationTime(20);
                response.getCacheControl().setUseCachedContent(true);
                return;
            }
        } else {
            System.out.println("Expiration Tag is null");
        }

        // create new content with new validation tag
        session.setAttribute(CACHE_ETAG, CACHE_ETAG);
        response.getCacheControl().setETag(CACHE_ETAG);
        response.getCacheControl().setExpirationTime(20);
...