How does query caching work? I want to create library for Angular and I would like to understand React version first.