I have a view called show_board
. Inside it, among other things, I increment a field Board.views
by 1 every time it is run, to count page views.
The problem is that when I use the @cache_page decorator on that view, Board.views
is only going to get incremented every time a new cached view gets generated, and not every time that view is requested, like I want to.
How could I achieve this?