@@ -6,18 +6,18 @@ Cache.__index = Cache
6
6
7
7
--- @class grapple.cache.options
8
8
--- @field event ? string | string[]
9
- --- @field pattern ? string
9
+ --- @field pattern ? string | string[]
10
10
--- @field interval ? integer
11
11
--- @field debounce ? integer in milliseconds
12
12
13
13
--- @class grapple.cache.value
14
14
--- @field event ? string | string[]
15
- --- @field pattern string ?
16
- --- @field interval integer ?
17
- --- @field debounce integer ? in milliseconds
15
+ --- @field pattern ? string | string[]
16
+ --- @field interval ? integer
17
+ --- @field debounce ? integer in milliseconds
18
18
--
19
- --- @field au_id integer ?
20
- --- @field timer uv_timer_t ?
19
+ --- @field au_id ? integer
20
+ --- @field timer ? uv_timer_t
21
21
--
22
22
--- @field debouncing boolean
23
23
--- @field watching boolean
@@ -33,6 +33,10 @@ function Cache:new()
33
33
}, self )
34
34
end
35
35
36
+ function Cache :is_open (id )
37
+ return self .cache [id ] ~= nil
38
+ end
39
+
36
40
--- @param id string
37
41
--- @param opts grapple.cache.options
38
42
function Cache :open (id , opts )
0 commit comments