Skip to content

Commit

Permalink
Add cautions for cache_set
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Jun 30, 2023
1 parent 88d29b6 commit 7a836c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/pink/pink-extension/src/chain_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ pub trait PinkExt {
///
/// * `Result<(), StorageQuotaExceeded>` - `Ok(())` or `Err(StorageQuotaExceeded)` if the storage quota is exceeded.
///
/// # Caution
///
/// The cache is not guaranteed to be persistent. It may be cleared at any time due
/// to various reasons:
/// - The cached item is expired.
/// - The entire cache in pRuntime is full and a new value needs to be stored.
/// - The worker is restarted.
///
/// # Example
///
/// ```
Expand Down

0 comments on commit 7a836c6

Please sign in to comment.