In my web.config for my very simple web app I have the code:
<sessionState
cookieless="false" regenerateExpiredSessionId="true" mode="Custom"
customProvider="NCacheSessionProvider" timeout="20">
<providers>
<add
name="NCacheSessionProvider"
type="Alachisoft.NCacheExpress.Web.SessionState.NSessionStoreProvider"
sessionAppId="NCacheTest"
cacheName="myreplicatedcache"
writeExceptionsToEventLog="false"
enableLogs="false"
/>
</providers>
</sessionState>
I am adding 1000's of byte[1024] objects into the Session[] at a time using:
for (int count = 0; count < total; count++)
Session[DateTime.Now.Ticks + "_" + count] = new byte[size];
And yet when I check my command line stats on NCache, all I get is:
Cache-ID: myreplicatedcache
Scheme: replicated-server
Status: Running
Cluster size: 2
bibble1:8700
bibble2:8700
UpTime: 26/05/2010 13:23:09
Capacity: 200 MB
Count: 1
Cache-ID: mycache
Scheme: local
Status: Stopped
Though the addtestdata.exe myreplicatedcache /c 1000 /s 1024 adds lots to the count.
My objects are still available in the session, however.
Could someone tell me what's going, please?
Thanks,
Matt.
I think it saves all session data in one object. This means, that at that moment, you have 1 active session, and all the data is stored against that session. If you create another session, the count will increase to 2.