public class ICacheObject extends Objs
Objs.Constructor<T extends Objs>, Objs.Property<T>
Modifier | Constructor and Description |
---|---|
protected |
ICacheObject(Objs.Constructor<?> c,
Object js) |
Modifier and Type | Method and Description |
---|---|
static ICacheObject |
$as(Object obj) |
void |
destroy()
Destroys the Cache object entirely, removing it from the $cacheFactory set.
|
<T> T |
get(String key)
Retrieves named data stored in the Cache object.
|
Objs |
info()
Retrieve information regarding a particular Cache.
|
<T> T |
put(String key)
Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache.
|
<T> T |
put(String key,
T value)
Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache.
|
void |
remove(String key)
Removes an entry from the Cache object.
|
void |
removeAll()
Clears the cache object of any entries.
|
$as, $cast, $delete, $get, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toLocaleString, toString, valueOf
protected ICacheObject(Objs.Constructor<?> c, Object js)
public static ICacheObject $as(Object obj)
public void destroy()
public <T> T get(String key)
key
- the key of the data to be retrievedpublic Objs info()
public <T> T put(String key, T value)
key
- the key under which the cached data is stored.value
- the value to store alongside the key. If it is undefined, the key will not be stored.public <T> T put(String key)
key
- the key under which the cached data is stored.value
- the value to store alongside the key. If it is undefined, the key will not be stored.public void remove(String key)
key
- the key of the entry to be removedpublic void removeAll()
Copyright © 2018. All rights reserved.