I'm banging on this again, and I have a question about caching pages. Generating a "detailed" calendar page on each user request seems to be a huge waste of resources, especially since the calendar will only change when an event changes.
The "unit" in a calendar is an "Event". That has a bunch of associated characteristics, the "key" is a "Date".
Events are assembled into display units called "Days".
Days are then assembled into calendars, which can be weeks or months.
The units change only as often as the smallest unit within them changes. A calendar changes if a Day changes, and a day changes if an event changes.
Right now, I'm generating the calendar by selecting events within a range, then sorting them into days, and then into a calendar.
Has anyone thought about caching this sort of data?
If I store "days" then when a calendar is assembled, I can just "include" the days that are part of that calendar.
If I then store the calendar, I can just "include" that whole unit, and only update that unit if a "day" changes.
I can trigger the updates through the calendar admin (ie: when an event is changed/added/deleted), or it can be done the first time that view is called.
There are problems with each sort of view, but it seems extremely wasteful to re-generate a calendar without caching at least _some_ data.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
The "unit" in a calendar is an "Event". That has a bunch of associated characteristics, the "key" is a "Date".
Events are assembled into display units called "Days".
Days are then assembled into calendars, which can be weeks or months.
The units change only as often as the smallest unit within them changes. A calendar changes if a Day changes, and a day changes if an event changes.
Right now, I'm generating the calendar by selecting events within a range, then sorting them into days, and then into a calendar.
Has anyone thought about caching this sort of data?
If I store "days" then when a calendar is assembled, I can just "include" the days that are part of that calendar.
If I then store the calendar, I can just "include" that whole unit, and only update that unit if a "day" changes.
I can trigger the updates through the calendar admin (ie: when an event is changed/added/deleted), or it can be done the first time that view is called.
There are problems with each sort of view, but it seems extremely wasteful to re-generate a calendar without caching at least _some_ data.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.