Cache
Bowtie provides a simple key value store where you can store data with the client.
Keep in mind that if you store a large amount of data it will get transferred to and from the client
which could result in a poor user experience.
That being said, it can be very useful to store results from expensive computations.
-
bowtie.cache.
save
(key, value)[source]
Store the key value pair.
Parameters: |
- key (str) – The key to determine where it’s stored, you’ll need this to load the value later.
- value (object) – The value to store in the cache.
|
Returns: |
|
Return type: | None
|
-
bowtie.cache.
load
(key)[source]
Load the value stored with the key.
Parameters: | key (str) – The key to lookup the value stored. |
Returns: | The value if the key exists in the cache, otherwise None. |
Return type: | object |