Skip to content

Commit

Permalink
- 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeek committed Nov 15, 2020
1 parent e5659e4 commit 544bd3c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 38 deletions.
40 changes: 39 additions & 1 deletion docs/build/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,45 @@ Changelog

.. changelog::
:version: 1.1.0
:include_notes_from: unreleased
:released: Sun Nov 15 2020

.. change::
:tags: feature, region
:tickets: 191

Reworked the means by which values are serialized and deserialized from
backends, and provided for custom serialization of values. Added the
:paramref:`.CacheRegion.serializer` and
:paramref:`.CacheRegion.deserializer` parameters which may be set to any
serializer.

Serialization and deserialization now take place within the
:class:`.CacheRegion` so that backends may now assume string values
in all cases. This simplifies the existing backends and also makes
custom backends easier to write and maintain.

Additionally, the serializer is now applied to the user-defined value
portion of the :class:`.CachedValue` and not to the metadata or other
portions of :class:`.CachedValue` object itself, so the serialized portion
is effectively a "payload" within the larger :class:`.CachedValue`
structure that is passed as part of the larger string format. The overall
format is a separate JSON of the cached value metadata, followed by the
serialized form. This allows for end-user serialization schemes that are
hardwired to the values themselves without the need to serialize dogpile's
internal structures as well.

Existing custom backends should continue to work without issue; they
now have the option to forego any separate serialization steps, and
can also subclass a new backend :class:`.BytesBackend` that marks them
as a backend that only deals with bytes coming in and out; all
internal serialization logic from such a backend can be removed.

Pull request courtesy Alessio Bogon.

.. change::
:tags: change

Added pep-484 annotations to most of the dogpile.cache package.

.. changelog::
:version: 1.0.2
Expand Down
2 changes: 1 addition & 1 deletion docs/build/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
# The short X.Y version.
version = dogpile.__version__
# The full version, including alpha/beta/rc tags.
release = "1.0.2"
release = "1.1.0"


# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down
32 changes: 0 additions & 32 deletions docs/build/unreleased/191.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/build/unreleased/pep484.rst

This file was deleted.

0 comments on commit 544bd3c

Please sign in to comment.