Virtualentity service not caching

14 views
Skip to first unread message

Tropicalista

unread,
Jul 1, 2016, 11:56:20 AM7/1/16
to ColdBox Platform
I have this virtual entity service:

/**
* A ColdBox Enabled virtual entity service
*/
component extends="cborm.models.VirtualEntityService" singleton{
/**
* Constructor
*/
function init(){
// init super class
super.init(entityName="WmWidget",useQueryCaching=true,queryCacheRegion="myapp.authors");

   return this;
}

}

If I dump the query

        prc.widgets = widgetManagerService.list(asQuery=true);
        dump(prc.widgets);abort;

It states it's not cached:

Query
Execution Time: 0 ms 
Record Count: 5 
Cached: No 
Lazy: No 



So how can I cache a query from orm?

Luis Majano

unread,
Jul 1, 2016, 12:44:56 PM7/1/16
to coldbox

On Fri, Jul 1, 2016 at 10:56 AM, Tropicalista <sgozz...@gmail.com> wrote:
useQueryCaching

you need to enable the secondary cache in Application.cfc

Reply all
Reply to author
Forward
0 new messages