Solid Cache
hey @lxsmnsyc sorry to bother you. I´ve been trying your library, am I doing this correctly:
I'm not really sure how key works, I see it's string based, but was wondering how to effectively use this correctly
34 Replies
Key is for caching purposes. It allows solid cache where to save/load a resolved resource
- source doesn't do anything here; you aren't tracking anything.
- key must be string (as mentioned)
You should invert your key as source then produce a string from the source
@lxsmnsyc something like this:
yes! I think this should work
I would recommend though, adding a unique prefix to that string
Because solid-cache uses the same single cache for every boundary, and so it may conflict if you have too similar key factories
So, the key is basically what gets stored in cache?
no, it's the "key" to the data stored in cache
imagine a Map
i see!
yes that should work too
we need the source values in the key, right?
basically source is for tracking
what you return in source is passed to the key and getter
key produces the key, get produces the value
got it!
Thanks my man
let me know if there are any issues
@lxsmnsyc thanks my man. Question, is there anyway I can see where this cached data is being stored, just for debugging reasons?
I tried using solid devtools, but no luck
hmmm, yeah I don't think it can be inspected in solid-devtools
there's not much right now
even if i can console.log the data
how do you store it though? is something missing in the devtools?