G
Griff
I need to implement caching in a web application and have come up against a
design issue which I would like some advice on. Am using CLASSIC ASP...
The web application is a "business to business" application. So the users
who log on belong to many different companies.
There are system wide settings, for example financial exchange rates etc.
There are "business" settings, so for example colours. So all users that
belong to Business A will see a blue background, and those in Business B
will see a green background.
There are "user" settings, so for example font size.
As far as caching is concerned, the system wide settings should go in the
Application() cache. These will be the same for ALL users.
The "user" settings should presumably go in the Session() cache; they're
peculiar that an individual and you don't want them hanging around in RAM
for too long, so they can expire when the session expires.
But, the problem I have is knowing where to put the Business settings. If I
put them in the Session() cache then there will be X number of copies of the
same data and I can see this soon consuming a lot of memory. The
alternative is to put them in the Application() cache so that there is a
single copy, but the problem here is that it will be stored in memory and
there can be an awful lot of businesses...
Is there an alternative that I've not considered? I guess ideally I'd like
to put things in the Application() cache with a Time To Live value (rather
like a cookie or a DNS record has), but I don't think that this is
possible..
Any advice/suggestions would be most appreciated.
Thanks
Griff
design issue which I would like some advice on. Am using CLASSIC ASP...
The web application is a "business to business" application. So the users
who log on belong to many different companies.
There are system wide settings, for example financial exchange rates etc.
There are "business" settings, so for example colours. So all users that
belong to Business A will see a blue background, and those in Business B
will see a green background.
There are "user" settings, so for example font size.
As far as caching is concerned, the system wide settings should go in the
Application() cache. These will be the same for ALL users.
The "user" settings should presumably go in the Session() cache; they're
peculiar that an individual and you don't want them hanging around in RAM
for too long, so they can expire when the session expires.
But, the problem I have is knowing where to put the Business settings. If I
put them in the Session() cache then there will be X number of copies of the
same data and I can see this soon consuming a lot of memory. The
alternative is to put them in the Application() cache so that there is a
single copy, but the problem here is that it will be stored in memory and
there can be an awful lot of businesses...
Is there an alternative that I've not considered? I guess ideally I'd like
to put things in the Application() cache with a Time To Live value (rather
like a cookie or a DNS record has), but I don't think that this is
possible..
Any advice/suggestions would be most appreciated.
Thanks
Griff