com.dotmarketing.cache
Class RatingCache
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RatingCache
public RatingCache()
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 userrating - 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.