@@ -70,73 +70,73 @@ defmodule Cache.Redis do
7070 end
7171
7272 def hash_scan ( key , scan_opts \\ [ ] ) do
73- @ cache_adapter . hash_scan ( @ cache_name , key , scan_opts , adapter_options ( ) )
73+ @ cache_adapter . hash_scan ( @ cache_name , maybe_sandbox_key ( key ) , scan_opts , adapter_options ( ) )
7474 end
7575
7676 def hash_get ( key , field ) do
77- @ cache_adapter . hash_get ( @ cache_name , key , field , adapter_options ( ) )
77+ @ cache_adapter . hash_get ( @ cache_name , maybe_sandbox_key ( key ) , field , adapter_options ( ) )
7878 end
7979
8080 def hash_get_all ( key ) do
81- @ cache_adapter . hash_get_all ( @ cache_name , key , adapter_options ( ) )
81+ @ cache_adapter . hash_get_all ( @ cache_name , maybe_sandbox_key ( key ) , adapter_options ( ) )
8282 end
8383
8484 def hash_get_many ( key_fields ) do
8585 @ cache_adapter . hash_get_many ( @ cache_name , key_fields , adapter_options ( ) )
8686 end
8787
8888 def hash_set ( key , field , value , ttl \\ nil ) do
89- @ cache_adapter . hash_set ( @ cache_name , key , field , value , ttl , adapter_options ( ) )
89+ @ cache_adapter . hash_set ( @ cache_name , maybe_sandbox_key ( key ) , field , value , ttl , adapter_options ( ) )
9090 end
9191
9292 def hash_set_many ( keys_fields_values , ttl \\ nil ) do
9393 @ cache_adapter . hash_set_many ( @ cache_name , keys_fields_values , ttl , adapter_options ( ) )
9494 end
9595
9696 def hash_delete ( key , field ) do
97- @ cache_adapter . hash_delete ( @ cache_name , key , field , adapter_options ( ) )
97+ @ cache_adapter . hash_delete ( @ cache_name , maybe_sandbox_key ( key ) , field , adapter_options ( ) )
9898 end
9999
100100 def hash_values ( key ) do
101- @ cache_adapter . hash_values ( @ cache_name , key , adapter_options ( ) )
101+ @ cache_adapter . hash_values ( @ cache_name , maybe_sandbox_key ( key ) , adapter_options ( ) )
102102 end
103103
104104 def json_get ( key , path \\ nil ) do
105- @ cache_adapter . json_get ( @ cache_name , key , path , adapter_options ( ) )
105+ @ cache_adapter . json_get ( @ cache_name , maybe_sandbox_key ( key ) , path , adapter_options ( ) )
106106 end
107107
108108 def json_set ( key , path \\ nil , value ) do
109- @ cache_adapter . json_set ( @ cache_name , key , path , value , adapter_options ( ) )
109+ @ cache_adapter . json_set ( @ cache_name , maybe_sandbox_key ( key ) , path , value , adapter_options ( ) )
110110 end
111111
112112 def json_delete ( key , path ) do
113- @ cache_adapter . json_delete ( @ cache_name , key , path , adapter_options ( ) )
113+ @ cache_adapter . json_delete ( @ cache_name , maybe_sandbox_key ( key ) , path , adapter_options ( ) )
114114 end
115115
116116 def json_incr ( key , path , value \\ 1 ) do
117- @ cache_adapter . json_incr ( @ cache_name , key , path , value , adapter_options ( ) )
117+ @ cache_adapter . json_incr ( @ cache_name , maybe_sandbox_key ( key ) , path , value , adapter_options ( ) )
118118 end
119119
120120 def json_clear ( key , path ) do
121- @ cache_adapter . json_clear ( @ cache_name , key , path , adapter_options ( ) )
121+ @ cache_adapter . json_clear ( @ cache_name , maybe_sandbox_key ( key ) , path , adapter_options ( ) )
122122 end
123123
124124 def json_array_append ( key , path , value_or_values ) do
125- @ cache_adapter . json_array_append ( @ cache_name , key , path , value_or_values , adapter_options ( ) )
125+ @ cache_adapter . json_array_append ( @ cache_name , maybe_sandbox_key ( key ) , path , value_or_values , adapter_options ( ) )
126126 end
127127
128128 def smembers ( key , opts ) do
129129 @ cache_adapter . smembers (
130130 @ cache_name ,
131- key ,
131+ maybe_sandbox_key ( key ) ,
132132 Keyword . merge ( adapter_options ( ) , opts )
133133 )
134134 end
135135
136136 def sadd ( key , value , opts \\ [ ] ) do
137137 @ cache_adapter . sadd (
138138 @ cache_name ,
139- key ,
139+ maybe_sandbox_key ( key ) ,
140140 value ,
141141 Keyword . merge ( adapter_options ( ) , opts )
142142 )
0 commit comments