Topic: Page view tracking with Caching?

In my app currently, I am tracking, what is basically, page views for the user to see. I would like to also cache these page, but I realize that in doing so, I won't be able to increment my counter any longer. I prefer to use a full page cache, and not fragment or action caching.

Is there an elegant way of doing this?

Re: Page view tracking with Caching?

On page load run an ajax request that increments the counter and updates the div with the counter in  it.

Re: Page view tracking with Caching?

I probably have been a little more specific. This is actually for an xml request. I didn't want to complicate things by mentioning that and just used a generic page view concept, but the idea is the same. The xml feed is hit, increments a count.

I would like to cache the xml that gets generated because I get thousands of requests a day, but sometimes my app isnt running in passenger due to inactivity. Plus I would just like to avoid rails in that case all together.