|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
File cache system interface.
System for caching texts (it stores and retrieves strings) by use of a key.
While in theory it is possible to cache ANY text, this is mainly used to store pages
based on their url.
Caching is done in pools. Each pool has its own memory cache and files, and has
different ways to handle file caching.
| Method Summary | |
java.lang.String |
get(java.lang.String pool,
java.lang.String key,
scanpage sp)
Retrieve a file from the indicated pool's cache. |
java.lang.String |
get(java.lang.String pool,
java.lang.String key,
java.lang.String line,
scanpage sp)
Retrieve a file from the indicated pool's cache. |
long |
getExpireDate(java.lang.String poolName,
java.lang.String key,
java.lang.String expireStr)
getExpireDate. |
long |
getLastModDate(java.lang.String poolName,
java.lang.String key)
getLastModDate. |
void |
init()
Initializes the module. |
java.lang.String |
newput(java.lang.String pool,
javax.servlet.http.HttpServletResponse res,
java.lang.String key,
java.lang.String value,
java.lang.String mimeType)
Store a file in the indicated pool's cache. |
java.lang.String |
newput2(java.lang.String pool,
java.lang.String key,
java.lang.String value,
int cachetype,
java.lang.String mimeType)
Deprecated. Temporary hack for solving asis problems (?). Use newput(java.lang.String, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.String, java.lang.String) instead. |
java.lang.String |
put(java.lang.String pool,
java.lang.String key,
java.lang.String value)
Store a file in the indicated pool's cache. |
void |
remove(java.lang.String poolName,
java.lang.String key)
Removes an entry from the cache pool. |
| Method Detail |
public void init()
public java.lang.String get(java.lang.String pool,
java.lang.String key,
scanpage sp)
key - key under which the content was cached
null if no entry was found
(i.e. cache was empty or poolname was invalid).
public java.lang.String get(java.lang.String pool,
java.lang.String key,
java.lang.String line,
scanpage sp)
key - key under which the content was cachedline - options for retrieving, such as an expiration value
null if no entry was found
(i.e. cache was empty or poolname was invalid).
public long getExpireDate(java.lang.String poolName,
java.lang.String key,
java.lang.String expireStr)
poolName - key - expireStr -
public long getLastModDate(java.lang.String poolName,
java.lang.String key)
poolName - key -
public java.lang.String put(java.lang.String pool,
java.lang.String key,
java.lang.String value)
key - key under which the content was cachedvalue - content to store
null if no entry was found
public java.lang.String newput(java.lang.String pool,
javax.servlet.http.HttpServletResponse res,
java.lang.String key,
java.lang.String value,
java.lang.String mimeType)
res - reponse object for retrieving headers (used by mmbase.org?)key - key under which the content was cachedvalue - content to storemimeType - the content's mime type
null if no entry was found
public java.lang.String newput2(java.lang.String pool,
java.lang.String key,
java.lang.String value,
int cachetype,
java.lang.String mimeType)
newput(java.lang.String, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.String, java.lang.String) instead.
key - key under which the content was cachedvalue - content to storecachetype - only needed for cachepool "PAGE".
If 0, no file transfer is performed. Otherwise the NetFileSrv builder is
invoked to start the VWM that handles the transfer.mimeType - the page's mime type, only needed for cachepool "PAGE"
null if no entry was found
public void remove(java.lang.String poolName,
java.lang.String key)
key - key of the content to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||