TCache: A Transactional cache with user-defined persistence

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the README on GitHub at https://github.com/agocorona/TCache#readme


[Skip to Readme]

Properties

Versions 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.4, 0.6.5, 0.8.0, 0.8.0.1, 0.8.0.2, 0.9, 0.9.0.1, 0.9.0.2, 0.9.0.3, 0.9.0.4, 0.10.0.0, 0.10.0.1, 0.10.0.2, 0.10.0.3, 0.10.0.4, 0.10.0.5, 0.10.0.6, 0.10.0.8, 0.10.0.9, 0.10.0.10, 0.10.0.11, 0.10.0.12, 0.10.1.0, 0.10.2.0, 0.10.2.1, 0.10.2.2, 0.10.2.3, 0.10.2.4, 0.11.0.0, 0.12.0, 0.12.1, 0.13.2
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), bytestring, containers (>=0.1.0.1), directory (>=1.0), hashtables, mtl, old-time (>=1.0), RefSerialize, stm, text [details]
License BSD-3-Clause
Copyright 2019 Alberto Gómez Corona
Author Alberto Gómez Corona
Maintainer agocorona@gmail.com
Category Data, Database
Home page https://github.com/agocorona/TCache#readme
Bug tracker https://github.com/agocorona/TCache/issues
Source repo head: git clone https://github.com/agocorona/TCache
Uploaded by AlbertoCorona at 2019-12-07T13:45:17Z

Modules

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for TCache-0.13.2

[back to package description]

TCache

TCache is a transactional cache written in Haskell with configurable persistence. It allows conventional STM transactions for objects that synchronize with a user-defined storage. State is kept synchronized between memory and permanent storage via transactions. Default persistence is via files, and is provided for testing purposes.

0.9.0.4 : Solves a bug in the management of weak pointers that evaporated registers from the cache 0.9.0.3 : Solves a lost registers bug. 0.9.0.1 : Solves a bug when object keys generate invalid filenames, and includes changes in defaultPersistence to further separate serialization from input-output.

0.9: Introduces full text search. Also adjusts serialization so it is achieved through byteStrings.

This version supports backward compatibility and also permits transparent retrieval of and transactions between objects without directly using STM references. It now provides explicit STM persistent references (DBRefs) that leverage clean, traditional haskell reference syntax for performing database transactions.

DBRefs are essentially persistent TVars indexed in the cache using a traditional readDBRef/writeDBRef Haskell interface like that of the STM Monad. Additionally, because DBRefs are serializable, they can be embedded in serializable registers. As they are references this means they point to other serializable registers. This enables persistent, mutable and efficient inter-object relations.

Triggers are also included in this release. These are user defined hooks that get called on register updates. They can be used for making the actualization of inter-object relations easier, and also permit higher-level customizable accesses. The query language internally uses triggers for its indexing.

This version also implements a straight-forward, non-intrusive, type-safe pure Haskell query language that is based on register field relations. This module can be imported separately. See Data.TCache.IndexQuery for further information.

The file persistence implementation is more reliable as IO reads are now in STM transactions.

To ease the implementation of other user-defined persistence, Data.TCache.DefaultPersistence needs to be imported explicitly for deriving file persistence instances.

The 0.9 version adds full-text indexing and search, which is incorporated into the experimental query language.

It also changes the default Persistence mechanism. Now ByteStrings are used for serialization and deserialization. A Serializable class and a Persist structure decouples serialization from ByteString and read/write to files. Both can be redefined separately, so the default persistence could be changed with setPersist to write to blobs in a databases, for example. Default persistence now no longer has to be in files.