Plugin : Dictionary Cache

Author:Rex.Rainbow

Download

Properties

Prefix

  • Prefix for storing into local storage.

Actions

Dictionary

Action:Add key

  • Add a new key in to storage. If it already exists, its value will be overwritten.
    • Key ( string ) : The name of the key. If it already exists, its value will be overwritten.
    • Value ( number or string ) : The value to store for the key.

Action:Set key

  • Set an existing key in to storage. If it does not exist, this will have no effect.
    • Key ( string ) : The name of the key. If it does not exist, this will have no effect.
    • Value ( number or string ) : The value to store for the key.

Action:Delete key

  • Delete a key from storage.
    • Key ( string ) : The name of the key to delete.

Action:Clear

  • Delete all keys and values from storage, returning to empty.

JSON

Action:Load

  • Load from a dictionary previously encoded in JSON format.
    • Cache name ( string ) : Cache name.
    • JSON ( string ) : A string of the JSON data to load.

Action:Download

  • Download the contents of the dictionary as a JSON file.
    • Filename ( string ) : The name of the file to download.

Load cache

Action:Load cache

  • Load cache from local storage.
    • Cache name ( string ) : Cache name.

Expressions

Dictionary

Expression:Get

  • Get the value from a key. 0 is returned if it does not exist.
    • Key ( string ) : The name of the key to retrieve.

Expression:KeyCount

  • Get the number of keys in storage.

For Each

Expression:CurrentKey

  • Get the current key name in a for-each loop.

Expression:CurrentValue

  • Get the current key value in a for-each loop.

JSON

Expression:AsJSON

  • Return the contents of the array in JSON format.

Load cache

Expression:TotalLoadingKeysCount

  • Get total loading keys count. Return if loading progress had been done.

Expression:CurrentLoadedKeysCount

  • Get current loaded keys count. Return if loading progress had been done.

Conditions

Dictionary

Condition:Compare value

  • Compare the value at a key.
    • Key ( string ) : The name of the key to test.
    • Comparison ( cmp ) : How to compare the key's value.
    • Value ( number or string ) : The value to compare to.

Condition:Has key

  • Check if a key name has been stored.
    • Key ( string ) : The name of the key to check if exists.

Condition:Is empty

  • True if no keys are in storage.

For Each

Condition:For each key

  • Repeat the event for each key/value pair that has been stored.

Condition:Compare current value

  • Compare the value at the current key in the for-each loop.
    • Comparison ( cmp ) : How to compare the value of the current key in the for-each loop.
    • Value ( number or string ) : The value to compare to.

Initial cache

Condition:On initial cache

  • Triggered when initial cache.

Load cache

Condition:On load cache complete

  • Triggered when load cache complete.

Condition:Is loading

  • True if in loading cache progress.

Writing actions

Condition:On writing actions complete

  • Triggered when writing actions complete.

Condition:Is writing

  • True if in writing cache progress.