views:

189

answers:

2

Is it possible to declaratively configure the spring.net cache rather using attributes?

I dont want to add the attribute such as :

[CacheResult("AspNetCache", "'Airport.Id=' + #id", TimeToLive = "0:1:0")]

I'd rather do this in configuration files

+1  A: 

It looks like spring.net doesn't support this yet. Quote from the documentation of the latest release (1.3rc1): "The aspect currently relies on using attributes to specify the pointcut as well as the behavior, much like the transactional aspect. Future versions will allow for external configuration of the behavior so you can apply caching to a code base without needing to use attributes in the code."

And there is a related issue in their Jira.

AlexD
A: 

Yep.

I had to write a new parser etc

ListenToRick