Cache Service
缓存
借助此服务,脚本可以临时缓存需要花费时间提取/计算的结果。公共缓存适用于不依赖于哪个用户访问脚本的内容。私密缓存用于存储特定于用户的内容,例如设置或近期活动。
类
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-02。
[null,null,["最后更新时间 (UTC):2024-12-02。"],[[["Apps Script Cache service provides temporary storage for script results, improving performance by avoiding redundant computations or fetches."],["Two types of caches are available: public caches for shared data and private caches for user-specific information."],["`CacheService` offers methods to access document, script, or user-scoped caches, while the `Cache` class provides methods for data manipulation within a cache instance, like adding, retrieving, and removing entries."],["Cache entries can have optional expiration times, allowing for automatic removal after a specified duration."]]],[]]