In one of the projects, we had used Query Caching to improve the performance. However, it also meant that the updates/inserts into a table did not get reflected immediately, i.e. something like:
DomainClass.findByPropertyName("propertyName", [cache: true])
returned the same list as it was, before the insertion/updation took place. We found that this could be resolved by clearing the query cache every time an update took place. This was done in Grails by making a call:
Make sure that the artefact(controller, service, taglib, job etc.) has sessionFactory injected into it using the line:
Hope this helps.