Console Webservice API

CacheManager

Other API in Package

Console

Console System

Internal Console

Provides a cross-workflow-engine encrypted storage and non-encrypted caching of information. The total aggregate size of all cached objects cannot exceed 10MB per Pal. The per cached object size has a limit of 500K. Temporary storage has a one week limit. Long term storage has no limit.

Method Summary
String cacheFile(File file, String scope, int expireInSeconds)

Caches the file for the amount of time specified and restricts the access scope. Returns a file url that can be used in an audio or image tag for rendering the file. This is not a high performance and high scale method. It is meant to be used for displaying or streaming a single file to a single user or caching it short term for later processing.

int clearCache(int limit)
⚠Deprecated since 06-24-2021. No longer used. We now charge for cache storage and don't limit the size

Deletes up to 10,000 cache entries. This might take a long time to execute and may not clear all in one thread- consequently you should check the result and if it is the same as the limit, plan on calling it again.

Chunk createChunk(String chunkId)

Creates a chunk

  deleteCachedFile(String url)

Deletes the cached file, if any. See cacheFile()

  deleteChunk(String chunkId)

Deletes the chunk

  deleteItem(String key)

Deletes the information with the specified key.

String enableUpload(String type, int kilobytes, String address, int expire)

Enables short-lived target for a non-browser client to send a file and restricts the upload to type and maximum file size. type can be * (all types) or a comma delimited string of types. kilobytes cannot exceed the pal activation settings for max upload. The URL should be given to the client application for one time use. It is also used to retrieve the file by calling getCachedFile(String url)

String get(String key)

Returns the information with the specified key.

int getAvailable()
⚠Deprecated since 06-24-2021. No longer used. We now charge for cache storage and don't limit the size

Returns the amount of cache available.

int getCacheSize()
⚠Deprecated since 06-24-2021. No longer used. We now charge for cache storage and don't limit the size

Returns the total size of the cache for this Pal in KB.

File getCachedFile(String url)

Returns the cached file, if any. See cacheFile()

Chunk getChunk(String chunkId)

Returns the chunk with the given ID associated with this Pal

Data getData(String key)

Returns the Data with the specified key.

PacketDataList getDataList(String key)

Returns the DataList with the specified key.

LockManager getLockManager()

Returns the LockManager associated with this Cache.

Payload getPayload(String key)

Returns the Payload with the specified key.

  put(String key, String data)

Stores the information indefinitely, replacing any with the same key.

  put(String key, String data, int expires)

Stores the information for [expires] minutes, replacing any with the same key.

  putData(String key, Data data)

Stores the Data for indefinitely, replacing any with the same key.

  putData(String key, Data data, int expires)

Stores the Data for [expires] minutes, replacing any with the same key.

  putDataList(String key, DataList datalist)

Stores the DataList indefinitely, replacing any with the same key.

  putDataList(String key, DataList datalist, int expires)

Stores the DataList for [expires] minutes, replacing any with the same key.

  putPayload(String key, Payload payload)

Stores the Payload indefinitely, replacing any with the same key.

  putPayload(String key, Payload payload, int expires)

Stores the Payload for [expires] minutes, replacing any with the same key.

String retrieve(String key)

Returns the information with the specified key from storage without caching it

  store(String key, String data)

Stores the information indefinitely, replacing any with the same key. This method stores to the storage but not to the cache.

String toString()

Returns a description of this object.

Method Detail


String cacheFile(File file, String scope, int expireInSeconds)

Caches the file for the amount of time specified and restricts the access scope. Returns a file url that can be used in an audio or image tag for rendering the file. This is not a high performance and high scale method. It is meant to be used for displaying or streaming a single file to a single user or caching it short term for later processing.

Parameters:

  • File   file Required parameter.
  • String   scope Required parameter. Allowed values: profile, pal.
  • int   expireInSeconds  - Time in seconds before the file is removed from the cache. Maximum allowed size of parameter: 2764800

Returns:  String

Since: 02-26-2016

top

int clearCache(int limit)

Deletes up to 10,000 cache entries. This might take a long time to execute and may not clear all in one thread- consequently you should check the result and if it is the same as the limit, plan on calling it again.

Parameters:

  • int   limit  - How many entries to delete. Maximum allowed size of parameter: 10000

Returns:  int

Since: 09-04-2013

This method has been deprecated since 06-24-2021. No longer used. We now charge for cache storage and don't limit the size

top

Chunk createChunk(String chunkId)

Creates a chunk

Parameters:

  • String   chunkId Required parameter. Maximum allowed size of parameter: 120

Returns:  Chunk

Since: 12-15-2017

top

deleteCachedFile(String url)

Deletes the cached file, if any. See cacheFile()

Parameters:

  • String   url Required parameter.

Since: 04-11-2016

top

deleteChunk(String chunkId)

Deletes the chunk

Parameters:

  • String   chunkId Required parameter.

Since: 12-15-2017

top

deleteItem(String key)

Deletes the information with the specified key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128

Since: 09-04-2013

top

String enableUpload(String type, int kilobytes, String address, int expire)

Enables short-lived target for a non-browser client to send a file and restricts the upload to type and maximum file size. type can be * (all types) or a comma delimited string of types. kilobytes cannot exceed the pal activation settings for max upload. The URL should be given to the client application for one time use. It is also used to retrieve the file by calling getCachedFile(String url)

Parameters:

  • String   type Required parameter.
  • int   kilobytes Required parameter.
  • String   address  - Restrict to this IP address. Required parameter.
  • int   expire  - Time in seconds before the file is removed from the cache. Maximum allowed size of parameter: 604800

Returns:  String

Since: 07-20-2016

top

String get(String key)

Returns the information with the specified key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128

Returns:  String

Since: 09-04-2013

top

int getAvailable()

Returns the amount of cache available.

Returns:  int

Since: 01-26-2018

This method has been deprecated since 06-24-2021. No longer used. We now charge for cache storage and don't limit the size

top

int getCacheSize()

Returns the total size of the cache for this Pal in KB.

Returns:  int

Since: 09-04-2013

This method has been deprecated since 06-24-2021. No longer used. We now charge for cache storage and don't limit the size

top

File getCachedFile(String url)

Returns the cached file, if any. See cacheFile()

Parameters:

  • String   url Required parameter.

Returns:  File

Since: 02-26-2016

top

Chunk getChunk(String chunkId)

Returns the chunk with the given ID associated with this Pal

Parameters:

  • String   chunkId Required parameter.

Returns:  Chunk

Since: 12-15-2017

top

Data getData(String key)

Returns the Data with the specified key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128

Returns:  Data

Since: 11-16-2016

top

PacketDataList getDataList(String key)

Returns the DataList with the specified key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128

Returns:  PacketDataList

Since: 11-16-2016

top

LockManager getLockManager()

Returns the LockManager associated with this Cache.

Returns:  LockManager

Since: 02-24-2017

top

Payload getPayload(String key)

Returns the Payload with the specified key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128

Returns:  Payload

Since: 11-16-2016

top

put(String key, String data)

Stores the information indefinitely, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • String   data Required parameter. Maximum allowed size of parameter: 512000

Since: 09-04-2013

top

put(String key, String data, int expires)

Stores the information for [expires] minutes, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • String   data Required parameter. Maximum allowed size of parameter: 512000
  • int   expires Required parameter. Maximum allowed size of parameter: 10080

Since: 09-04-2013

top

putData(String key, Data data)

Stores the Data for indefinitely, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • Data   data Required parameter.

Since: 01-16-2018

top

putData(String key, Data data, int expires)

Stores the Data for [expires] minutes, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • Data   data Required parameter.
  • int   expires Required parameter. Maximum allowed size of parameter: 10080

Since: 11-16-2016

top

putDataList(String key, DataList datalist)

Stores the DataList indefinitely, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • DataList   datalist Required parameter.

Since: 10-08-2018

top

putDataList(String key, DataList datalist, int expires)

Stores the DataList for [expires] minutes, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • DataList   datalist Required parameter.
  • int   expires Required parameter. Maximum allowed size of parameter: 10080

Since: 11-16-2016

top

putPayload(String key, Payload payload)

Stores the Payload indefinitely, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • Payload   payload Required parameter.

Since: 12-21-2017

top

putPayload(String key, Payload payload, int expires)

Stores the Payload for [expires] minutes, replacing any with the same key.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • Payload   payload Required parameter.
  • int   expires Required parameter. Maximum allowed size of parameter: 10080

Since: 11-16-2016

top

String retrieve(String key)

Returns the information with the specified key from storage without caching it

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128

Returns:  String

Since: 04-18-2016

top

store(String key, String data)

Stores the information indefinitely, replacing any with the same key. This method stores to the storage but not to the cache.

Parameters:

  • String   key Required parameter. Maximum allowed size of parameter: 128
  • String   data Required parameter. Maximum allowed size of parameter: 512000

Since: 04-18-2016

top

String toString()

Returns a description of this object.

Returns:  String

Since: 09-04-2013

top
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. API Date: Nov 18, 2024 01:04 PM