CacheService使用GAS提供的缓存大小是多少? [英] What is the size of the cache provided by CacheService using GAS

查看:102
本文介绍了CacheService使用GAS提供的缓存大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CacheService的最大容量是多少?



我知道缓存中可以存储的最大时间是21600秒,但我找不到多大publicCache和privateCache的大小实际上是以及我们如何能够找出缓存中有多少空间(stll)。

由于缓存无法刷新(请参阅如何刷新缓存),并且似乎无法从所有密钥中检索所有密钥缓存(为了从缓存中删除所有对象),我认为我要求的信息是很重要的。



最好是(当然)提供有关cachesize,keys和允许刷新的信息。

解决方案

如上所述,CacheService大小没有记录。每个密钥存储的最大数据量为100KB,但可能有多个密钥。在使用多个密钥存储了一个实验值为10MB的数据。这个限制是由于执行超时所致,所以可能有更多的可能。



你可能想看看这个社区开发 CacheHandler库,如果您希望使用CacheService进行大量临时数据存储。

What is the maximum size of the CacheService ?

I know the maximum time something can be stored in cache is 21600 seconds, but I can't find how large the sizes of the publicCache and the privateCache actually are and how we can findout how much space (stll) is available in cache.

As the cache can't be flushed (see How to flush the cache) and there seems to be no way retrieving all keys from the cache (in order to delete all objects from the cache), I think the kind of info I'm asking for is important.

Best would be (of course) to provide info about cachesize, keys and allow flushing.

解决方案

As mentioned the CacheService size is undocumented. There is a 100KB maximum amount of data stored per key but multiple keys are possible. In an experiment 10MB worth of data was stored using multiple keys. This limit was hit due to execution timeout so more may be possible.

You may want to look at this community developed CacheHandler library if you are anticipating on using CacheService for a lot of temporary data storage.

这篇关于CacheService使用GAS提供的缓存大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆