Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
214 views
in Technique[技术] by (71.8m points)

ebean - Possible to change behavior of setUseQueryCache(true) from "MUST USE" to "USE IF POSSIBLE?"

I am in the process of testing IGNITE for level 2 caching on my project. It has a lot of promise and I am excited to be using it.

One of the issues is that for development purposes, it's pretty heavy and since it starts up a full IGNITE node on dev workstations, is reduces engineers efficiency. This is because of the memory footprint and the fact that when source code is changed and class files are automatically reloaded, IGNITE is started again and again and complains mightily

This is a long-winded way to get to the point, which is that when I disable the l2Cache (ie, IGNITE) using the recommended approach:

ebean.disableL2Cache=true

I get a slew of runtime errors because we are using query caching extensively throughout the codebase. The error messages essentially state that .setUseQueryCache(true) cannot be run because there is no l2Cache enabled.

It seems like treating the semantics of .setUseQueryCache(true) from "you must use the query cache or fail noisily" to "use the query cache if possible" would be a minor change and would save [me, at least] a lot of grief.

question from:https://stackoverflow.com/questions/65557474/possible-to-change-behavior-of-setusequerycachetrue-from-must-use-to-use-if

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...