@DeclareRoles(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RolesAllowed(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) public class MagentoCache extends Object
://www.adam-bien.com/roller/abien/entry/singleton_the_perfect_cache_facade| Constructor and Description |
|---|
MagentoCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheCustomer(String id,
org.imixs.workflow.ItemCollection customer)
puts an entity into the cache and adds the property $cached with the
current timestamp
|
void |
cacheProduct(String id,
org.imixs.workflow.ItemCollection product)
puts an entity into the cache and adds the property $cached with the
current timestamp
|
void |
clearCache() |
void |
flush()
This method removes all entities form the cache where the $cached
timestamp is older then the refreshTime.
|
org.imixs.workflow.ItemCollection |
getCustomer(String id)
Returns a customer from the cache
|
org.imixs.workflow.ItemCollection |
getProduct(String id)
Returns a product from the cache
|
int |
getRefresh()
get refresh time in seconds
|
void |
initialize() |
void |
setRefresh(int refresh) |
@PostConstruct public void initialize()
public int getRefresh()
public void setRefresh(int refresh)
public void clearCache()
public org.imixs.workflow.ItemCollection getProduct(String id)
productid - public org.imixs.workflow.ItemCollection getCustomer(String id)
productid - public void cacheProduct(String id, org.imixs.workflow.ItemCollection product)
id - product - public void cacheCustomer(String id, org.imixs.workflow.ItemCollection customer)
id - customer - public void flush()
Copyright © 2020 Imixs Software Solutions GmbH. All rights reserved.