I have tried to implement different caching-implementations in a classic ASP site in order to offload the database during heavy traffic.
My approach was this:
Create a global HashTable object in global.asa where I later on store jscript-objects within
<object id="SIZE_LIST" progid="System.Collections.HashTable" runat="Server" scope="Application"></object>
This gives me a global HashTable-object that I at certain time-intervals replace the content of the HashTable. The size will only vary slightly, but I however do .Remove() and .Add() all objects, each time.
This works very well, besides from the fact that after a certain time, the memoryallocation of the app gets to high, giving irrational behaviour of the sessions. It will "forget" sessions, but not invoke OnSessionStart() in global.asa. Therefor, leaving visitors with an empty Session-collection.
Can I somehow improve the memory-reallocation-process? Is there any better approach for object-caching?
I have tried using plain textfiles with json-serialized data, but the deserialization of that is to much overhead. I thought about binary-serialization, but I'm not sure if it's even possible in classic ASP.