Hello,
I have a view that shows a television schedule, similar to DirectTVs
(http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a list of
channels and programs in a 4 hour slice broken into 1/2 hour columns.
When the schedule first loads the start time is is the most recent 1/2
hour mark. Meaning that if its 7.03am the window will start at 7am. If
the time is 7.47am the window will start at 7.30. You are able to page
left and right in 1/2 hour chunks.
I am trying to improve performance of the view, as you can imagine its
a ton of data to compile and the HTML is fairly complex. My aim is
cache the most current schedule chunk. So assume the time is currently
7.03am. The application gets it's first request for the schedule. The
controller fetches the schedule from the model starting at 7.00am and
then caches it. All subsequent requests for that particular start time
(7am) for all users will use the cached version until 7.30am at which
point the cache is cleared and process starts again.
I have implemented Cake's view caching and set the cache action as
follows:
$this->cacheAction = array('getTvSchedule/' => 1800);
This causes an obvious problem. If the first request for a schedule
comes after a 1/2 hour mark (7am, 7.30am, 8am etc) the cache will
refreshed a half hour after that time and not at the next half hour
mark. I can do some math to figure out the remaining time and use that
to set the cache timeout.
My big problem comes when paging right and left in time. The cache
manager does not recognize that a different request has been made and
it serves the current cached version. How do I get the cache manager
to see the difference?
Thanks.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en