Skip to main content

A Zope product with memcached-backed ZCache and Zope session implementations.

Project description

https://github.com/dataflake/Products.mcdutils/actions/workflows/tests.yml/badge.svg https://coveralls.io/repos/github/dataflake/Products.mcdutils/badge.svg Documentation Status Current version on PyPI Supported Python versions

Products.mcdutils

The Products.mcdutils product supplies a replacement for the ZODB-based session data container supplied by the Transience product, shipped with the Zope core prior to Zope 4 and available as a separate package after that. Rather than using a ZODB storage as the backing store for session data, as Transience does, Products.mcdutils stores session data in a cluster of one or more memcached servers.

This approach is a bit of a cheat, as it uses the daemons as primary stores, rather than as caches for results of an expensive query. Nevertheless, the semantics are not a bad match for typical session usage.

Documentation

Documentation is available at https://mcdutils.readthedocs.io/

Bug tracker

A bug tracker is available at https://github.com/dataflake/Products.mcdutils/issues

Attribution

Thanks go to…

  • Tres Seaver for implementing this product back in 2006

  • Christian Theune for making it available as egg on PyPI in 2011

  • Jens Vagelpohl for preparing it for Zope 4 and Python 3

Change log

4.0 (2023-02-02)

  • Drop support for Python 2.7, 3.5, 3.6.

3.3 (2023-01-15)

  • Add support for Python 3.10 and 3.11.

3.2 (2021-09-03)

  • reorganized package to use current zopefoundation standards

  • claim compatibility with Python 3.9 and Zope 5

  • fixed type error on adding session items via ZMI test page

3.1 (2021-01-01)

  • revised ZMI ‘Test Adding Items to Session’

3.0 (2020-08-07)

  • packaging cleanup and test fixing due to shifting dependencies

  • drop Zope 2 compatibility claims and tests

2.5 (2019-11-13)

  • implement transaction savepoint support (#3)

2.4 (2019-10-23)

  • attempt to hide session values that may contain passwords in __repr__ which is used when rendering the REQUEST object as string.

2.3 (2019-10-13)

  • rely on the Zope 4.x branch for Python 2 compatibility

  • update description to replace Zope2 wording with just Zope

  • reorganize source folder structure and drop the src folder

2.2 (2019-05-21)

  • add an implementation for has_key which is gone under Python 3

2.1 (2019-03-31)

  • fix wrong method call during cache manager record invalidation (#1)

2.0 (2019-03-28)

  • make sure zcache.aggregateKey does not create unsuitable MemCache keys

  • allow storing values that don’t conform to IMemCacheMapping

  • add ability to set a title for a MemCacheZCacheManager

  • Python 3 compatibility

  • switch to the python-memcached library and remove the old memcache library module inside this package, which is actually a really old version of python-memcached.

Possible breaking change

The objects returned by Zope’s session data manager are implicitly expected to support Acquisition. Zope’s session data manager uses it to insert itself into the object’s acquisition chain. However, under Python 3 Acquisition can no longer be supported by the session data objects due to a metaclass conflict between the classes permisstence.mapping.PersistentMapping and Acquisition.Explicit. This may break expectations for code consuming the session data objects from this package.

1.0 (2019-03-28)

  • Zope 4 compatibility

  • documentation using Sphinx

  • tox configuration for unit, coverage and code quality tests

  • package configuration cleanup

  • full flake8 compliance

  • add ability to set a title for a MemcacheProxy

  • add ability to set a title for a MemcacheSessionDataContainer

0.2b3 (2011-11-21)

  • Extend MANIFEST.in to include other missing files (.gif, .pt, .txt)

0.2b2 (2011-11-21)

  • Fix source distribution by including README.txt and CHANGES.txt via manifest.

  • Include test runner in buildout and fix broken tests.

0.2b1 (2011-11-19)

  • Turn product into an egg and release on PyPI.

  • Implement a forced refresh of the in-process cache of memcache data at the end of transactions to avoid stale data.

  • mapping.py: Added ‘getContainerKey’ method to ‘MemCacheMapping’ in order to make it compatible with the API of the TemporaryFolder version (allows the session testing rig code can generate error messages).

  • Added (preliminary) RAMCacheManager replacement.

  • Removed proxy’s ‘create’ method, to allow other multiple of data to be stored. The session data container now handles instantiating the mapping.

  • Fixed the pickling of mappings correctly, instead of requiring that the proxy pick out the ‘data’ member.

  • Expanded API for IProxy to expose more of the memcached client API.

0.1 (2006-05-31)

  • CVS tag, ‘mcdutils-0_1’

  • Initial public release.

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

Products.mcdutils-4.0.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

Products.mcdutils-4.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file Products.mcdutils-4.0.tar.gz.

File metadata

  • Download URL: Products.mcdutils-4.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for Products.mcdutils-4.0.tar.gz
Algorithm Hash digest
SHA256 5ffcebe8880558ae29d1133658144a1ed101701297ea447f29b428792e9e1c0e
MD5 886600207894d691ab41cce354f97cbc
BLAKE2b-256 04417ff1b40223cc87535e59e43f22e336ba1693cf1e617031a6bdaf50f2a86e

See more details on using hashes here.

File details

Details for the file Products.mcdutils-4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Products.mcdutils-4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b2bd89b250756823c81c554992f9f7940af6f49da5449d5a5fa81bba0299a3a
MD5 9d78ce1c4b2a841de5ca58cc6e0e5e03
BLAKE2b-256 8aa06453db52450757f15600efbc5373a277fd133734545352542d44d6c41367

See more details on using hashes here.

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