Package ch.entwine.weblounge.common.impl.request

Examples of ch.entwine.weblounge.common.impl.request.CacheTagImpl


        }
      }

      // Add the ghost content provider to the set of cache tags
      if (ghostContentProvider != null) {
        response.addTag(new CacheTagImpl(CacheTag.Resource, ghostContentProvider.getURI().getIdentifier()));
      }

      // If pagelets have been found, set them in the composer
      ghostPaglets = ghostContent;
      pagelets = content;
View Full Code Here


   *
   * @see ch.entwine.weblounge.common.content.Taggable#addTag(java.lang.String,
   *      java.lang.String)
   */
  public boolean addTag(String key, String value) {
    return tags.add(new CacheTagImpl(key, value));
  }
View Full Code Here

   */
  @Test
  public void testContainsTag() {
    assertTrue(entry.containsTag(tag));
    assertTrue(entry.containsTag(otherTag));
    assertFalse(entry.containsTag(new CacheTagImpl("a", "x")));
  }
View Full Code Here

   * .
   */
  @Test
  public void testAddTags() {
    List<CacheTag> tags = new ArrayList<CacheTag>();
    CacheTag t = new CacheTagImpl("u", "uvalue");
    tags.add(t);
    handle.addTags(tags);
    assertTrue(handle.containsTag(t));
  }
View Full Code Here

   */
  @Test
  public void testContainsTagCacheTag() {
    assertTrue(handle.containsTag(tag));
    assertTrue(handle.containsTag(otherTag));
    assertFalse(handle.containsTag(new CacheTagImpl("u", "v")));
  }
View Full Code Here

    deletePreviews(resource);

    // Make sure related stuff gets thrown out of the cache
    ResponseCache cache = getCache();
    if (cache != null && (allRevisions || uri.getVersion() == Resource.LIVE)) {
      cache.invalidate(new CacheTag[] { new CacheTagImpl(CacheTag.Resource, uri.getIdentifier()) }, true);
    }

    return true;

  }
View Full Code Here

    }

    // Make sure related stuff gets thrown out of the cache
    ResponseCache cache = getCache();
    if (cache != null) {
      cache.invalidate(new CacheTag[] { new CacheTagImpl(CacheTag.Resource, uri.getIdentifier()) }, true);
    }
  }
View Full Code Here

    ResponseCache cache = getCache();
    if (cache != null && uri.getVersion() == Resource.LIVE) {
      List<CacheTag> tags = new ArrayList<CacheTag>();

      // resource id
      tags.add(new CacheTagImpl(CacheTag.Resource, uri.getIdentifier()));

      // subjects, so that resource lists get updated
      for (String subject : resource.getSubjects())
        tags.add(new CacheTagImpl(CacheTag.Subject, subject));

      cache.invalidate(tags.toArray(new CacheTagImpl[tags.size()]), true);
    }

    // Write the updated resource to disk
View Full Code Here

      createPreviews(resource);

    // Make sure related stuff gets thrown out of the cache
    ResponseCache cache = getCache();
    if (cache != null) {
      cache.invalidate(new CacheTag[] { new CacheTagImpl(CacheTag.Resource, uri.getIdentifier()) }, true);
    }

    return resource;
  }
View Full Code Here

    deletePreviews(resource, content.getLanguage());

    // Make sure related stuff gets thrown out of the cache
    ResponseCache cache = getCache();
    if (cache != null) {
      cache.invalidate(new CacheTag[] { new CacheTagImpl(CacheTag.Resource, uri.getIdentifier()) }, true);
    }

    return resource;
  }
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.impl.request.CacheTagImpl

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.