com.dotmarketing.cache
Class RatingCache

java.lang.Object
  extended by com.dotmarketing.cache.RatingCache

public class RatingCache
extends java.lang.Object

This class is used to cache user ratings in memory based on the user long lived cookie

Author:
david, Jason Tesser

Constructor Summary
RatingCache()
           
 
Method Summary
static void addToRatingCache(Rating rating)
          To add a new rating to the cache
static void clearCache()
           
static java.lang.String[] getGroups()
           
static java.lang.String getPrimaryGroup()
           
static Rating getRatingFromCache(java.lang.String identifier, java.lang.String longLivedCookie)
          To retrieve a rating from the cache
static void removeRating(Rating rating)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatingCache

public RatingCache()
Method Detail

addToRatingCache

public static void addToRatingCache(Rating rating)
To add a new rating to the cache

Parameters:
clientkey - The key is used to identify the submitter of the rating in this case we are using the long lived cookie set in the browser of every dotcms frontend user
rating - The rating to store in the cache

removeRating

public static void removeRating(Rating rating)

getRatingFromCache

public static Rating getRatingFromCache(java.lang.String identifier,
                                        java.lang.String longLivedCookie)
To retrieve a rating from the cache

Parameters:
identifier -
longLiveCookie -
Returns:

clearCache

public static void clearCache()

getGroups

public static java.lang.String[] getGroups()

getPrimaryGroup

public static java.lang.String getPrimaryGroup()


Copyright © 2013 dotCMS Inc. All Rights Reserved.