You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2021. It is now read-only.
// Wrap the same database and cache instances multiple times with different lifetimes to easily set
88
90
// different lifetimes for different objects.
89
91
```
90
-
92
+
### Directly accessing caches from an application program
93
+
Caches can be directly accessed and modified using the methods of com.cloudant.client.cache.Cache and com.cloudant.client.cache.CacheWithLifetimes. For example, the following method call adds "object1" with key “key1” to the cache. “lifetime” is the lifetime of the cached value in milliseconds:
94
+
```java
95
+
cache.put(key1, object1, lifetime);
96
+
```
97
+
The following method call deletes the object indexed by "key2" from the cache if it exists:
0 commit comments