Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Typeable a => VCacheable a where
- module Database.VCache.VGet
- module Database.VCache.VPut
Documentation
class Typeable a => VCacheable a where Source
To be utilized with VCache, a value must be serializable as a simple sequence of binary data and child VRefs. Also, to put then get a value must result in equivalent values. Further, values are Typeable to support memory caching of values loaded.
Under the hood, structured data is serialized as the pair:
(ByteString,[Either VRef PVar])
Developers must ensure that get
on the serialization from put
returns the same value. And get
must be backwards compatible.
Developers should consider version wrappers, cf. SafeCopy package.
Serialize a value as a stream of bytes and value references.
Parse a value from its serialized representation into memory.
VCacheable Bool | |
VCacheable Char | |
VCacheable Int | |
VCacheable Integer | |
VCacheable Word8 | |
VCacheable () | |
VCacheable ByteString | |
VCacheable ByteString | |
VCacheable VSpace | |
VCacheable a => VCacheable [a] | |
VCacheable a => VCacheable (Maybe a) | |
VCacheable a => VCacheable (PVar a) | |
VCacheable a => VCacheable (VRef a) | |
(VCacheable a, VCacheable b) => VCacheable (Either a b) | |
(VCacheable a, VCacheable b) => VCacheable (a, b) | |
(VCacheable a, VCacheable b, VCacheable c) => VCacheable (a, b, c) | |
(VCacheable a, VCacheable b, VCacheable c, VCacheable d) => VCacheable (a, b, c, d) | |
(VCacheable a, VCacheable b, VCacheable c, VCacheable d, VCacheable e) => VCacheable (a, b, c, d, e) | |
(VCacheable a, VCacheable b, VCacheable c, VCacheable d, VCacheable e, VCacheable f) => VCacheable (a, b, c, d, e, f) | |
(VCacheable a, VCacheable b, VCacheable c, VCacheable d, VCacheable e, VCacheable f, VCacheable g) => VCacheable (a, b, c, d, e, f, g) |
module Database.VCache.VGet
module Database.VCache.VPut