You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can add records to the MMF cache, but I couldn't find a way to get the data back, either with tA.Get(key) or tA.AsEnumerable(withValues: true).
var cache = new LocalCache();
var pile = new MMFPile(cache);//Pile owned by cache
pile.DataDirectoryRoot = @"c:\temp\test";
cache.Pile = pile;
cache.Configure(null);
cache.DefaultTableOptions = new TableOptions("*")
{
CollisionMode = CollisionMode.Durable
};
cache.Start();
var tA = cache.GetOrCreateTable<int>("A");
for (int i = 0; i < 10000; i++)
{
tA.Put(i, Person.MakeFake());
}
DisposableObject.DisposeAndNull(ref cache);
The text was updated successfully, but these errors were encountered:
unruledboy
changed the title
reading data back from MMF
can't read data back from MMF
Jul 25, 2017
The LocalCache class does not use pile to store it's key buckets. You get your mmf pile back with data
but not the keys.
The MMF-backed cache is not a part of oss yet, what you can do for now - reload the keys back to local cache by enumerating through them using pile, but it will be slow depending on the number of object that you store. OR you can save all of the cache keys separately and load them up on startup which is also not automatic.
Hi,
I used the sample code from your files : https://github.com/aumcode/nfx/blob/master/Source/Testing/Manual/WinFormsTest/PileForm.cs#L77-L84 and https://github.com/aumcode/nfx/tree/master/Source/NFX/ApplicationModel/Pile
I can add records to the MMF cache, but I couldn't find a way to get the data back, either with tA.Get(key) or tA.AsEnumerable(withValues: true).
The text was updated successfully, but these errors were encountered: