[Bug?]: deleteCacheKey()
does not format key like cache()
& cacheFindMany()
#7346
Labels
bug/needs-info
More information is needed for reproduction
What's not working?
When I call
deleteCacheKey([key, id])
it cannot find the key even though it is the same value passed tocache([key, id])
orcacheFindMany(key)
.Code References:
redwood/packages/api/src/cache/index.ts
Lines 80 to 85 in 2efee67
redwood/packages/api/src/cache/index.ts
Lines 137 to 143 in 2efee67
redwood/packages/api/src/cache/index.ts
Lines 188 to 205 in 2efee67
How do we reproduce the bug?
Using
deleteCacheKey([key, id])
with a global prefix/api/src/lib/cache.ts
fileexport const { cache, cacheFindMany, cacheClient, deleteCacheKey } = createCache(client, { logger, + prefix: `prod`, timeout: 500, })
prod-productCategories-GUID
deleteCacheKey()
for your update queryproductCategories.GUID
)What's your environment? (If it applies)
System: OS: macOS 12.0.1 Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.2 - /private/var/folders/.../node Yarn: 3.2.0 - /private/var/folders/.../yarn Databases: SQLite: 3.36.0 - /usr/bin/sqlite3 Browsers: Chrome: 109.0.5414.87 Firefox: 107.0 Safari: 15.1 npmPackages: @redwoodjs/core: ^3.8.0 => 3.8.0
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: