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.
the documentation does not say how large the cache is.
Even in appengine when using a non-dedicated cache, you dont know how much you will get.
you can do a lot with whats available. Use the expiration time, and use my answer to the question you linked (How to flush the cache) for a way to "force-expire" individial cached elements. Seems that what you primarily want is to expire them all at once, and the linked answer says how to do it.
An alternative solution to store large items https://github.com/yinonavraham/GoogleAppsScripts/tree/master/EnhancedCacheService