Skip to content

Cache Memory only works with numbers #2537

Closed Answered by mihaitodor
danriedl asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @danriedl 👋 It's by design. Values in caches are stored as bytes, so this will throw an error if the data it gets isn't something that can be parsed using a JSON parser. What you want to use there is root.name = content().string(). The .string() part is needed because otherwise the data in that name field will get serialised back to JSON using base64 encoding.

PS: Converting this to a discussion as per #2026.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mihaitodor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2536 on April 23, 2024 15:40.