Skip to content

Simple Dict that is backed on hard disk

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.md
Notifications You must be signed in to change notification settings

jw3126/DiskBackedDicts.jl

Repository files navigation

DiskBackedDicts

Build Status codecov.io

Usage

julia> using DiskBackedDicts

julia> d = DiskBackedDict("somepath.jld2")
DiskBackedDict{Any,Any} with 0 entries

julia> d["hello"] = "world"
"world"

julia> d
DiskBackedDict{Any,Any} with 1 entry:
  "hello" => "world"

julia> exit()

Now start a new session:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.1 (2018-09-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using DiskBackedDicts

julia> d = DiskBackedDict("somepath.jld2")
DiskBackedDict{Any,Any} with 1 entry:
  "hello" => "world"

Performance

The whole dictionary is cached in memory. getindex performs no disk operations and is as fast as for an ordinary Dict. setindex! performs disk operations and is slow.

Limitations

  • Only one julia process can access a DiskBackedDict at a particular path simultaneously.

About

Simple Dict that is backed on hard disk

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages