File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
content/develop/ai/langcache Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -140,3 +140,13 @@ DELETE https://[host]/v1/caches/{cacheId}/entries
140140 }
141141}
142142{{< /clients-example >}}
143+
144+ ### Flush the cache
145+
146+ Use
147+ [ POST /v1/caches/{cacheId}/flush] ( https://redis.io/docs/latest/develop/ai/langcache/api-reference/#tag/Cache-Entries/operation/flush )
148+ to flush all entries from the cache.
149+
150+ {{< clients-example set="langcache_sdk" step="flush" dft_tab_name="REST API" footer="hide" >}}
151+ POST https://[ host] /v1/caches/{cacheId}/flush
152+ {{< /clients-example >}}
Original file line number Diff line number Diff line change @@ -108,3 +108,11 @@ async function deleteQuery() {
108108
109109deleteQuery ( ) ;
110110// STEP_END
111+
112+ // STEP_START flush
113+ async function flush ( ) {
114+ await langCache . flush ( ) ;
115+ }
116+
117+ flush ( ) ;
118+ // STEP_END
Original file line number Diff line number Diff line change 7373
7474print (res )
7575# STEP_END
76+
77+ # STEP_START flush
78+ lang_cache .flush ()
79+ # STEP_END
You can’t perform that action at this time.
0 commit comments