Actually that's kind of similar to how it's panning out. The
boundaries are defined by the cache elements, rather than by partial
file or other rendering boundaries, so you could cache output in
whatever hunks you see fit.
Each occurance of the cache element visited as code is generated
becomes it's own distinct scope (key) which will be run or not
depending on cache miss or hit. You can also provide addtl values in
<cache key="xxx"> (value of expression xxx combined with scope key at
run time) if the contents vary by productId, for example, or username,
or sessionid.
The cache memory itself is abstracted by an ICacheService with Get and
Store methods, and the default cache service calls the native
ASP.NET
Cache methods Get and Insert. That way it can get the benefits of the
existing memory pressure algorithm, duration and non-used expiration,
etc.
One big question would be how to provide a mechanism to offer some
determistic cache entry invalidation. You can have a simple ttl
duration of course, but beyond that what's the cleanest way of hooking
cache entries into some sort of origination of a signal that some
change has invalidated those entries?