I’m using SQL Server for our database and when I have an entity cached in CUBA it will run the query, but then it will redundantly retrieve the records for the cache one at a time. When initially starting our application it will hit the database more than 6000 times to cache each record it has already loaded. Is this expected behavior? The business layer already has the record, can’t it just cache that?
This becomes problematic with cached queries. Every time a cached query runs the system will then again get redundantly retrieve each record for the cache from the database one at a time. It will do this even if the query is already cached. This makes caching queries useless and slower than ever.