We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key
Example:
#[cached] fn foo(key: u64, b: u64) -> u64 { key + b }
This will expand to
///This is a cached function that uses the [`FOO`] cached static. fn foo(key: u64, b: u64) -> u64 { use cached::Cached; use cached::CloneCached; let key = (key.clone(), b.clone()); { let mut cache = FOO.lock().unwrap(); if let Some(result) = cache.cache_get(&key) { return result.to_owned(); } } let result = foo_no_cache(key, b); let mut cache = FOO.lock().unwrap(); cache.cache_set(key, result.clone()); result }
Change the proc macro variable name to something else?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example:
This will expand to
Change the proc macro variable name to something else?
The text was updated successfully, but these errors were encountered: