/
CacheService.purs
39 lines (20 loc) · 1.08 KB
/
CacheService.purs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module Control.Google.Apps.Cache.CacheService (
getDocumentCache,
getScriptCache,
getUserCache
) where
import Effect (Effect)
import Data.Google.Apps.Cache.Cache as CacheCache
import Data.Google.Apps.Cache.CacheService as CacheCacheService
foreign import getDocumentCacheImpl :: CacheCacheService.CacheService -> Effect CacheCache.Cache
-- | Gets the cache instance scoped to the current document and script.
getDocumentCache :: CacheCacheService.CacheService -> Effect CacheCache.Cache
getDocumentCache p' = getDocumentCacheImpl p'
foreign import getScriptCacheImpl :: CacheCacheService.CacheService -> Effect CacheCache.Cache
-- | Gets the cache instance scoped to the script.
getScriptCache :: CacheCacheService.CacheService -> Effect CacheCache.Cache
getScriptCache p' = getScriptCacheImpl p'
foreign import getUserCacheImpl :: CacheCacheService.CacheService -> Effect CacheCache.Cache
-- | Gets the cache instance scoped to the current user and script.
getUserCache :: CacheCacheService.CacheService -> Effect CacheCache.Cache
getUserCache p' = getUserCacheImpl p'