title: How can I spring.net inject in to methods?
body: <p>I posted to following on the spring.net forum but also hoped I may get some value views here:</p>
  
  <p>I am looking at some advice as to how I might achieve the following requirement. </p>
  
  <p>Firstly some background - I am using Spring.NET to achieve IOC depdenecny injection in to my asp.net c# multi tier web application. Injection is achieved via spring.net xml configuration file with all my development achieved by developing against interfaces and injecting in an interface implemented class where required. This all works fine for me. My knowledge would be intermediate level I believe.</p>
  
  <p>I have ran in to the problem and looking to achieve a solution for it.</p>
  
  <p>To take for example I have a class with several methods where they all retrieve from a database, data being cached for a period of time.</p>
  
  <p>I want to have freedom to inject in to each method the characteristics of the caching eg. time for it to live in cache etc. So rather than inject in class to where its required, I also want to be able to inject values in to methods. </p>
  
  <p>I could go along the approach of creating properties on the class for each method but this gets messay, or injecting in settings to my class. My preference is to control each method via spring injection.</p>
  
  <p>So any ideas how this can be achieved as I expect it something than others may have encountered.</p>
  
  <p>One possible idea that I have come up with is to somehow inject an attribute on to each of the method via spring with attribute having properties with the values that required in the method eg cache duration etc. Is this a feasible solution? If so, could anyone assist me with configuring such.</p>
  
  <p>Or if anyone has any other ideas, it would be great.</p>