I have output caching in my application configured using output cache profiles in the web.config. It is very convenient to be able to setup caching on all the output items that need it and then be able to adjust all the cache settings in one place.
However, I am also implementing caching in my data and logic layers for certain items. It would be convenient if I could also reference a profile instead of hard coding the caching parameters for data and logic items I want to cache, but there doesn't seem to be a way to reference a profile in the Insert() method on the cache object.
Alternativly, I could build my own configuration section to list cache profiles for manually added items.
You can get a list of your output cache profiles doing this:
And then use it on your insert: