Disk backed dictionary/cache for c#

前端 未结 10 761
無奈伤痛
無奈伤痛 2021-02-05 21:16

I\'m looking for a drop in solution for caching large-ish amounts of data.

related questions but for different languages:

  • Python Disk-Based Dictionary
相关标签:
10条回答
  • 2021-02-05 21:35

    I'd take the embedded DB route (SQLite, Firebird), but here are some other options:

    • Berkeley DB: not your standard SQL embedded DB, but seems to be the right choice for this kind of task, although not easily usable from .net
    • db4o: an OODB, very simple interface
    0 讨论(0)
  • 2021-02-05 21:40

    I recommend the Caching Application block in the Enterprise Library from MS. That was recommended as well, but the link points to an article on the Data Access portion of the Enterprise Library.

    Here is the link to the Caching Application Block:

    http://msdn.microsoft.com/en-us/library/cc309502.aspx

    And specifically, you will want to create a new backing store (if one that persists to disk is not there):

    http://msdn.microsoft.com/en-us/library/cc309121.aspx

    0 讨论(0)
  • 2021-02-05 21:41

    Given your recent edits to the question, I suggest that you implement the solution noted in your question as you are very unlikely to find such a naive solution wrapped up in a library for you to reuse.

    0 讨论(0)
  • 2021-02-05 21:42

    Disclaimer - I am about to point you at a product that I am involved in.

    I'm still working on the web site side of things, so there is not a lot of info, but Serial Killer would be a good fit for this. I have examples that use .Net serialization (can supply examples), so writing a persistent map cache for .Net serializable objects would be trivial.

    Enough shameless self promotion - if interested, use the contact link on the website.

    0 讨论(0)
  • 2021-02-05 21:43

    Here is a B-Tree implementation for .net: http://bplusdotnet.sourceforge.net/

    0 讨论(0)
  • 2021-02-05 21:51

    This is very similar to my question

    Looking for a simple standalone persistant dictionary implementation in C#

    I don't think a library that exactly fits what you want exists, maybe its time for a new project on github.

    0 讨论(0)
提交回复
热议问题