Skip to main content

A wrapping store caching entities in memcached.

Project description

A memcached based cache for any store used with tiddlyweb.
Decorates an existing store, wrapping a defined store, caching
retrieved objects.

To make use of this store, there are several software and
administrative requirements. This is fairly complex stuff
so don't expect to be able to just turn it on and make it go.

You must have:

* a memcached server
* the python-memcached module
* the following changes to your tiddlywebconfig.py:

config = {
# set the server_store to be the caching.py module
'server_store': ['tiddlywebplugins.caching', {}],
# the host and port of one or more memcached servers.
# this is separate from server_store in case there are
# other things that want to use a memcached server
'memcache_hosts': ['127.0.0.1:11211'],
# the configuration of the base store which is
# being cached by the caching store. Its structure
# is the same as server_store.
'cached_store': ['text', {'store_root': 'store'}],
}

If you run this code against the TiddlyWeb core tests you should
be aware that some of them will fail because the cache is not
flushed between runs, so sometimes there are incorrect values
in the cache.

If you choose to use this in a production environment you will
need to write some scripts which start, stop or clear the memcache
cache upon each fresh start of the server. You must also keep in
mind that if you edit data in your on disk store by hand, you need
to remember to invalidate the in RAM cache through some mechanism.

Licensed under the same terms as TiddlyWeb itself.

Copyright 2010, Chris Dent <cdent@peermore.com>.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tiddlywebplugins.caching-0.9.2.tar.gz (56.6 kB view details)

Uploaded Source

File details

Details for the file tiddlywebplugins.caching-0.9.2.tar.gz.

File metadata

File hashes

Hashes for tiddlywebplugins.caching-0.9.2.tar.gz
Algorithm Hash digest
SHA256 bb85fcad4b0bb4719d8d143df8e17282a4c0f9853cff33f3adcb09ef3b1fb779
MD5 35c1b4a8a749c08a62826707417aed58
BLAKE2b-256 b65f6e65c3b2fc340cc405efae3fb19ba615230ffddede1e62568d5ddcf9cc1b

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page