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
| Constructor | Description |
|---|---|
| JsonCacheOptions() |
Methods
| Method | Description |
|---|---|
| equals(Object arg0) | |
| getClass() | |
| getCompressDisk() | Gets whether to compress disk cache using Gzip (default: true). |
| getDiskPath() | Gets the disk cache directory path. |
| 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). |
| 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. |
| 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). |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
JsonCacheOptions()
public JsonCacheOptions()
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.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
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
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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
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:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
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:
| Parameter | Type | Description |
|---|---|---|
| value | IGridJsJsonCache |
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:
| Parameter | Type | Description |
|---|---|---|
| value | long |
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:
| Parameter | Type | Description |
|---|---|---|
| value | int |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |