DefaultGridJsJsonCache

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.gridjs.IGridJsJsonCache

public class DefaultGridJsJsonCache implements IGridJsJsonCache

\u699b\u6a3f\ue17b\u9428?JSON \u7f02\u64b3\u74e8\u7039\u70b5\u5e47\u951b\u57201 \u9350\u546d\u74e8 + L2 \u7ebe\u4f7a\u6d0f\u951b?

Constructors

ConstructorDescription
DefaultGridJsJsonCache(GridJsOptions options)\u6d63\u8de8\u6564 GridJsOptions \u95b0\u5d87\u7586\u9352\u6d98\u7f13\u7f02\u64b3\u74e8\u7039\u70b0\u7de5
DefaultGridJsJsonCache()\u6d63\u8de8\u6564\u934f\u3125\u772c Config \u95b0\u5d87\u7586\u9352\u6d98\u7f13\u7f02\u64b3\u74e8\u7039\u70b0\u7de5\u951b\u581f\u68e4\u9359\u509b\u702f\u95ab\u72b2\u56b1\u93c1\u5e2e\u7d1a

Methods

MethodDescription
clearAll()
equals(Object arg0)
getCacheKey(String uid, String fileName)
getClass()
hashCode()
invalidate(String cacheKey)
invalidateAllForUid(String uid)
notify()
notifyAll()
setJson(String cacheKey, String json)
toString()
tryGetJson(String cacheKey)
wait()
wait(long arg0)
wait(long arg0, int arg1)

DefaultGridJsJsonCache(GridJsOptions options)

public DefaultGridJsJsonCache(GridJsOptions options)

\u6d63\u8de8\u6564 GridJsOptions \u95b0\u5d87\u7586\u9352\u6d98\u7f13\u7f02\u64b3\u74e8\u7039\u70b0\u7de5

Parameters:

ParameterTypeDescription
optionsGridJsOptions

DefaultGridJsJsonCache()

public DefaultGridJsJsonCache()

\u6d63\u8de8\u6564\u934f\u3125\u772c Config \u95b0\u5d87\u7586\u9352\u6d98\u7f13\u7f02\u64b3\u74e8\u7039\u70b0\u7de5\u951b\u581f\u68e4\u9359\u509b\u702f\u95ab\u72b2\u56b1\u93c1\u5e2e\u7d1a

clearAll()

public void clearAll()

Clear all caches

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getCacheKey(String uid, String fileName)

public String getCacheKey(String uid, String fileName)

Generate a cache key. Customers can decide whether to include the uid based on business requirements. - If only the file name matters: ignore uid and use fileName only (recommended, allows sharing cache across same file). - If distinguishing files with the same name is required: use uid (strict mode).

Parameters:

ParameterTypeDescription
uidjava.lang.String
fileNamejava.lang.String

Returns: java.lang.String

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public native int hashCode()

Returns: int

invalidate(String cacheKey)

public void invalidate(String cacheKey)

Invalidate the specified cache entry.

Parameters:

ParameterTypeDescription
cacheKeyjava.lang.String

invalidateAllForUid(String uid)

public void invalidateAllForUid(String uid)

Invalidate all cache entries containing the specified uid. This is useful when you don’t know the exact fileName used for caching.

Parameters:

ParameterTypeDescription
uidjava.lang.String

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setJson(String cacheKey, String json)

public void setJson(String cacheKey, String json)

Write JSON into cache.

Parameters:

ParameterTypeDescription
cacheKeyjava.lang.String
jsonjava.lang.String

toString()

public String toString()

Returns: java.lang.String

tryGetJson(String cacheKey)

public String tryGetJson(String cacheKey)

Attempt to retrieve JSON from cache.

Parameters:

ParameterTypeDescription
cacheKeyjava.lang.String

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int