Using NHibernate.Mapping.Attributes, I can't use the CacheAttribute on a class -- I get this error from the compiler:
Code:
Attribute 'Cache' is not valid on this declaration type. It is valid on 'property, indexer, field' declarations only.
Is there any specific reason for this? Judging by the docs at
http://www.hibernate.org/hib_docs/nhibernate/html/performance.html#performance-cache, it should be available on classes as well.
The application I'm working on is ASP.NET 2.0, using NHibernate version 1.2.0, and the declaration of the class I'm trying to cache is:
Code:
[Class(0, Table = "`sample`")]
[Cache(1, Usage = CacheUsage.ReadWrite)]
public partial class @Sample