public class CachedResources extends Object
| Constructor and Description |
|---|
CachedResources()
Default constructor which initializes cache.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cacheResource(String path,
Resource resource,
String eTag,
long size)
Method to cache a given resource along with an Entity Tag.
|
Resource |
getCachedResource(String path)
Method to fetch a cached resource.
|
String |
getETag(String path)
Returns the Entity Tag corresponding to the given path.
|
int |
getSizeOfCache()
Method to obtain the size of the cache.
|
boolean |
isResourceCached(String path)
Method to determine whether the resource at the given path is cached.
|
public CachedResources()
public boolean isResourceCached(String path)
path - the resource path.public boolean cacheResource(String path, Resource resource, String eTag, long size)
path - the resource path.resource - the resource to cache.eTag - the entity tag.size - the maximum cache size.public Resource getCachedResource(String path)
path - the resource path.public String getETag(String path)
path - the resource path.public int getSizeOfCache()
Copyright © 2016 WSO2 Inc. All Rights Reserved.