java - Creating a Jooq Caching Layer -
so, i'm working on using jooq create caching layer on postgres. i've been using mockconnection/mockdataprovider objects intercept every query, , working, i'm having few issues.
first, how determine between reads , writes? is, how tell whether query insert/update/etc or select, given mockexecutecontext that's passed execute method in mockdataprovider?
and i'm bit confused on how can invalidations. basic scheme i'm implementing right whenever "write" query made table, invalidate cached queries involve table. goes first question, on telling different types of queries each other, brings issue: how identify tables used in query given sql string , bindings (both attributes of mockexecutecontext)?
also, correct approach @ caching? first thought override fetch() method, method final, , i'd rather not change embedded in jooq itself. other way think of intercept requests made create separate, persistent caching layer.
i have seen (https://groups.google.com/forum/#!topic/jooq-user/xsjrvnmcdhw) question, i'm still not clear on how lukas recommended identify tables object. can try implement postgres notify, wanted native in jooq first. i've seen issue (https://github.com/jooq/jooq/issues/2665) pop lot too, i'm not sure how applies.
keep in mind i'm new jooq, it's quite possible i'm missing obvious.
thanks!
Comments
Post a Comment