JsonCacheOptions

Inheritance: java.lang.Object

public class JsonCacheOptions

Configuration options for JSON caching in GridJs. Controls both memory (L1) and disk (L2) cache behavior.

Constructors

ConstructorDescription
JsonCacheOptions()

Methods

MethodDescription
equals(Object arg0)
getClass()
getCompressDisk()Gets whether to compress disk cache using Gzip (default: true).
getDiskPath()Gets the disk cache directory path.
getDiskTtl()Gets the TTL for disk cache, in minutes (default: 1440).
getEnable()Gets whether to enable JSON caching for faster response.
getEnableDisk()Gets whether to enable disk cache (default: true).
getImplementation()Gets the custom JSON cache implementation.
getMaxDiskSizeMB()Gets the maximum disk cache size in MB (default: 500 MB).
getMaxMemoryEntries()Gets the maximum number of entries in memory cache (default: 1000).
getMemoryTtl()Gets the TTL for memory cache, in minutes (default: 60).
hashCode()
notify()
notifyAll()
setCompressDisk(boolean value)Sets whether to compress disk cache using Gzip (default: true).
setDiskPath(String value)Sets the disk cache directory path.
setDiskTtl(long value)Sets the TTL for disk cache, in minutes (default: 1440).
setEnable(boolean value)Sets whether to enable JSON caching for faster response.
setEnableDisk(boolean value)Sets whether to enable disk cache (default: true).
setImplementation(IGridJsJsonCache value)Sets the custom JSON cache implementation.
setMaxDiskSizeMB(long value)Sets the maximum disk cache size in MB (default: 500 MB).
setMaxMemoryEntries(int value)Sets the maximum number of entries in memory cache (default: 1000).
setMemoryTtl(long value)Sets the TTL for memory cache, in minutes (default: 60).
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

JsonCacheOptions()

public JsonCacheOptions()

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCompressDisk()

public boolean getCompressDisk()

Gets whether to compress disk cache using Gzip (default: true). Takes effect when Enable = true and using default cache.

Returns: boolean

getDiskPath()

public String getDiskPath()

Gets the disk cache directory path. Takes effect when Enable = true and using default cache. Default: [FileCacheDirectory]/json_cache

Returns: java.lang.String

getDiskTtl()

public long getDiskTtl()

Gets the TTL for disk cache, in minutes (default: 1440). Takes effect when Enable = true and using default cache.

Returns: long

getEnable()

public boolean getEnable()

Gets whether to enable JSON caching for faster response. When enabled, GridJs will cache the generated JSON and reuse it for subsequent requests. The default value is false. Note: You need to set Implementation to use custom cache storage.

Returns: boolean

getEnableDisk()

public boolean getEnableDisk()

Gets whether to enable disk cache (default: true). Takes effect when Enable = true and using default cache.

Returns: boolean

getImplementation()

public IGridJsJsonCache getImplementation()

Gets the custom JSON cache implementation. If not set, GridJs will use the default memory + disk cache.

Returns: IGridJsJsonCache

getMaxDiskSizeMB()

public long getMaxDiskSizeMB()

Gets the maximum disk cache size in MB (default: 500 MB). Takes effect when Enable = true and using default cache.

Returns: long

getMaxMemoryEntries()

public int getMaxMemoryEntries()

Gets the maximum number of entries in memory cache (default: 1000). Takes effect when Enable = true and using default cache.

Returns: int

getMemoryTtl()

public long getMemoryTtl()

Gets the TTL for memory cache, in minutes (default: 60). Takes effect when Enable = true and using default cache.

Returns: long

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setCompressDisk(boolean value)

public void setCompressDisk(boolean value)

Sets whether to compress disk cache using Gzip (default: true). Takes effect when Enable = true and using default cache.

Parameters:

ParameterTypeDescription
valueboolean

setDiskPath(String value)

public void setDiskPath(String value)

Sets the disk cache directory path. Takes effect when Enable = true and using default cache. Default: [FileCacheDirectory]/json_cache

Parameters:

ParameterTypeDescription
valuejava.lang.String

setDiskTtl(long value)

public void setDiskTtl(long value)

Sets the TTL for disk cache, in minutes (default: 1440). Takes effect when Enable = true and using default cache.

Parameters:

ParameterTypeDescription
valuelong

setEnable(boolean value)

public void setEnable(boolean value)

Sets whether to enable JSON caching for faster response. When enabled, GridJs will cache the generated JSON and reuse it for subsequent requests. The default value is false. Note: You need to set Implementation to use custom cache storage.

Parameters:

ParameterTypeDescription
valueboolean

setEnableDisk(boolean value)

public void setEnableDisk(boolean value)

Sets whether to enable disk cache (default: true). Takes effect when Enable = true and using default cache.

Parameters:

ParameterTypeDescription
valueboolean

setImplementation(IGridJsJsonCache value)

public void setImplementation(IGridJsJsonCache value)

Sets the custom JSON cache implementation. If not set, GridJs will use the default memory + disk cache.

Parameters:

ParameterTypeDescription
valueIGridJsJsonCache

setMaxDiskSizeMB(long value)

public void setMaxDiskSizeMB(long value)

Sets the maximum disk cache size in MB (default: 500 MB). Takes effect when Enable = true and using default cache.

Parameters:

ParameterTypeDescription
valuelong

setMaxMemoryEntries(int value)

public void setMaxMemoryEntries(int value)

Sets the maximum number of entries in memory cache (default: 1000). Takes effect when Enable = true and using default cache.

Parameters:

ParameterTypeDescription
valueint

setMemoryTtl(long value)

public void setMemoryTtl(long value)

Sets the TTL for memory cache, in minutes (default: 60). Takes effect when Enable = true and using default cache.

Parameters:

ParameterTypeDescription
valuelong

toString()

public String toString()

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