In my .Net (C#) application I have a lot of objects which needs to be accessible very quickly. Because of some external limitations I don't have control over, I'm limited to one 32bit process. So I'm quickly hitting the memory limit of 4GB.
Is there any data structure I can use which can store these objects, and write them (temporary) to disk when memory usage becomes too large? Ideally, it would keep the objects which are accessed most frequently in memory and flush less used objects to disk.
I looked at several embedded databases, but they all seem to be storing either everything in memory or everything on disk.
Ideas?