I want to have a field that shows how many items are related in another table. Countercache looks promising on this.
Are the updates countercache does kind of like a currentvalue-1 and currentvalue+1? The documentation states that it doesn’t update the value if you do updateAll and deleteAll.
Or does it actually do a count of the rows in the result?
I’m asking because an external application inserts into the database daily. So after that I want to refresh the counter cache to keep the application quick. How can I trigger this refresh? By setting it dirty?
Perhaps Countercache is not the way to go here. And if so, what sort of construction would be best?
Thanks a lot in advance.