Niclas Hedhman wrote: >> For caching purposes there are also other kinds of metadata >> that would make sense to add as Entity Properties, such as Expires >> and MaxAge. > > And then, this I am not equally sure about. In fact, isn't this a > thing at "Entity Type" level, which actual times are handled > internally?? I.e. metaInfo should be enough, no? But you mention "per > instance" settings, which I am not totally convinced is useful and/or > feasible in actual code.
It is quite common that setting MaxAge on a per-instance basis would be very useful. For example, in a CMS system you could have a Page type, and instances that are in the root of the site would have a very low MaxAge (meaning, don't cache that much), whereas pages that have been archived can be cached for a long time as they are rarely if ever changed. Same type, but their instance characteristics are very different. My guess is that many systems is like this, that you have an "active set" and one "not-so-active" set of "archived" objects. > Perhaps there is use-cases, but we are then looking at a "Cache > Aspect" of an Entity and my question would then be; What other aspects > are there? And wouldn't that lead to a more generic approach, instead > of "hard coded" onto the Entity type? I should clarify that MaxAge and Expires values should be Entity Properties, but not necessarily specified on the Entity interface, i.e. they could be specified in a Caching mixin type interface so one can choose when to have it and when not to have it. It is entirely possible to do the same with LastModified and Version too, of course, but it might be nice to be able to rely on them being there all the time. /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

