vcache-0.2.3: large, persistent, memcached values and structure sharing for Haskell

Safe HaskellNone
LanguageHaskell2010

Database.VCache.Path

Synopsis

Documentation

vcacheSubdir :: ByteString -> VCache -> VCache Source

VCache implements a simplified filesystem metaphor. By assigning a different prefix for root PVars loaded by different subprograms, developers can guard against namespace collisions. Each component may have its own persistent roots.

While I call it a subdirectory, it really is just a prefix. Using "foo" followed by "bar" is equivalent to using "foobar". Developers should include their own separators if they expect them, i.e. "foo/" and "bar/".

Paths are limited to ~500 bytes. For normal use, this limit will not be a problem. If you're creating PVars based on runtime inputs, those should always be dynamic PVars. Root PVar names should never be much larger than fully qualified function names.

vcacheSubdirM :: ByteString -> VCache -> Maybe VCache Source

as vcacheSubdir, but returns Nothing if the path is too large.