I have class library which should encapsulates orm logic. To avoid some db calls, it should contain some kind of cache or static variables (I want to avoid them). It's used in asp.net and wcf applications. Since it's class library, I don't want to access Cache or other asp.net related stuff. I also want to avoid static vars because of the application scope nature of them.
How should I implement that? What do you do to achieve this?
EDIT:
To simplify: imagine class library encapsulating DAL. It talks to database. There are some costly queries inside. Some of them should be fetched once per user and stored somewhere and some of them could be used per Application (also stored to avoid future calls to DB). The thing is that normally I would use Cache, but since it's DAL class library, I want to include this functionality inside it (not in asp.net). Hope it's more clear now ;)