CacheUtils
Path
com.huawei.livedata.lambdaservice.util.CacheUtils
Description
This class is used to save and obtain cache information.
Method List
Returned Type |
Method and Description |
---|---|
static boolean |
putCache(String key, String value) Save cache information. |
static boolean |
putCache(String key, String value, int time) Save the cache information with the timeout interval. |
static String |
getCache(String key) Obtain cache information. |
static long |
removeCache(String key) Remove cache information. |
static String |
get(String key) Obtain dictionary cache information. |
Method Details
- public static boolean putCache(String key, String value)
Save cache information.
Input Parameter
- key indicates the key value of cache information.
- value indicates the cache information.
Returns
Corresponding boolean value.
- public static boolean putCache(String key, String value, int time)
Save the cache information with the timeout interval.
Input Parameter
- key indicates the key value of cache information.
- value indicates the cache information.
- time indicates the timeout interval.
Returns
Corresponding boolean value.
- public static String getCache(String key)
Obtain cache information.
Input Parameter
key indicates the key value of cache information.
Returns
Cache information corresponding to the key value.
- public static long removeCache(String key)
Remove cache information.
Input Parameter
key indicates the key value of cache information to be removed.
Returns
Execution result.
- public static String get(String key)
Obtain dictionary cache information.
Input Parameter
key indicates the key value of dictionary cache information.
Returns
Dictionary cache information corresponding to the key value.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot