Starlord
Starlord3d ago

fine-grained caching

Hey, Lets say we have Twitter like system with messages and likes of messages. Do I understand it right that getMessages paginated query would completely wipe it's cache once any message like count changes and refresh all messages instead of only this one? I think this is very important problem that's there is no caching control for developers.
3 Replies
jamwt
jamwt3d ago
this is true for now, but only until we enable subquery caching. Nothing architectural that's inherently limited. you can also manage it yourself for now by breaking queries up into a parent component that gets the message ids only and then individual components query the individual messages. this will eventually be possible purely server-side, but isn't just yet ( ^ a few high load sites have done this workaround for now to scale )
Starlord
StarlordOP3d ago
ok i understand. but would be easier if it will be handled on the server side. thanks Is there a possible timeline when this subquery caching will be added? Paginated query is already causing for me a lot of database consumption and with adding dynamic parameters as likes it will be like there is no caching at all. Every like dislike of a user will reset the cache
jamwt
jamwt2d ago
I'd guess it's at least 3-6 months out

Did you find this page helpful?