﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>carlos commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>I thought something similar... but with version information in a separate table. thanks for your comments.
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment9</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment9</guid><pubDate>Mon, 12 Mar 2007 21:46:46 GMT</pubDate></item><item><title>Ayende Rahien commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>I work a lot with temporal objects, and I certainly thinks that you question is appropriate.
  
In general, yes, you could use this approach to save the auditing data for the application.
  
I would recommend the Snapshot Pattern for this as well, if you will search my blog, you'll find several blog posts about the subject:
  
  
http://www.ayende.com/Blog/archive/7563.aspx
  
http://www.ayende.com/Blog/archive/2006/10/23/7153.aspx
  
  
I would recommend you to use an NHibernate IInterceptor for this, because NHibernate implements the Unit of Work pattern, and can save objects without you explicitly telling it to
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment8</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment8</guid><pubDate>Mon, 12 Mar 2007 20:34:46 GMT</pubDate></item><item><title>carlos commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description> "Historic entity" is an entity (a database table) that we need to save information about data changes.An object of a type that is historic can have versions. Martin Fowler call this Temporal Object pattern. For example, we have an entity Contract. If a contract changes, we need to know when, who and what was the changes. I want to be able to query entities in an old state (we can use Nhibernate filters for that). This is offen implemented with NHibernate Interceptors.  If you still dont understand my comment or is inappropriate or inapplicable for this post, then forget it. Thanks for your attention.
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment7</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment7</guid><pubDate>Mon, 12 Mar 2007 20:02:59 GMT</pubDate></item><item><title>Ayende Rahien commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>Carlos,
  
The issue is that I fail to understand what you mean by saying historic entity?
  
Do you mean a database where you never UPDATE, just INSERT?
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment6</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment6</guid><pubDate>Mon, 12 Mar 2007 19:33:01 GMT</pubDate></item><item><title>carlos commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>uff I only speak a bit of english, but... what i mean is implement historic at repository level and decorate with an attribute that entities that we want that save historical data. Same way that you become an entity cacheable in this post, we could become an entity "historical". Will be this a better way that implemet historic with nhibertate interceptors?
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment5</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment5</guid><pubDate>Mon, 12 Mar 2007 19:05:00 GMT</pubDate></item><item><title>Ayende Rahien commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>Carlos,
  
Can you explain what you mean in more details?
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment4</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment4</guid><pubDate>Mon, 12 Mar 2007 18:54:42 GMT</pubDate></item><item><title>carlos commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>do you think that i can implement historic entities with this? (some entities would save historic data and some not).
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment3</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment3</guid><pubDate>Mon, 12 Mar 2007 18:32:47 GMT</pubDate></item><item><title>Ayende Rahien commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>Precisely!
  
I am not using anything else (except for the AR stuff, but that is for another post).
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment2</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment2</guid><pubDate>Sun, 11 Mar 2007 19:42:12 GMT</pubDate></item><item><title>Mark Monster commented on AOP With Windsor: Adding Caching to IRepository&lt;T&gt; based on T's attributes</title><description>I'm still new to Windsor. But this sounds interesting. Are you using some more custom things in this example beside the code you show? As I reed this, I get the idea that the Cacheble attribute is just a custom attribute with no additional functionality. It just describes and has meaning besides this. Am I correct?
  
  
Yours,
  
  
Mark Monster
</description><link>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment1</link><guid>http://ayende.com/2203/aop-with-windsor-adding-caching-to-irepository-t-based-on-ts-attributes#comment1</guid><pubDate>Sun, 11 Mar 2007 19:30:12 GMT</pubDate></item></channel></rss>