Skip to content

Commit c21aad1

Browse files
committed
docs: add yaml serializer to serializers.rst
1 parent 1010e04 commit c21aad1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ How does it work
166166
Aiocache provides 3 main entities:
167167

168168
- **backends**: Allow you specify which backend you want to use for your cache. Currently supporting: SimpleMemoryCache, RedisCache using redis_ and MemCache using aiomcache_.
169-
- **serializers**: Serialize and deserialize the data between your code and the backends. This allows you to save any Python object into your cache. Currently supporting: StringSerializer, PickleSerializer, JsonSerializer, and MsgPackSerializer. But you can also build custom ones.
169+
- **serializers**: Serialize and deserialize the data between your code and the backends. This allows you to save any Python object into your cache. Currently supporting: StringSerializer, PickleSerializer, JsonSerializer, MsgPackSerializer, and YamlSerializer. But you can also build custom ones.
170170
- **plugins**: Implement a hooks system that allows to execute extra behavior before and after of each command.
171171

172172
If you are missing an implementation of backend, serializer or plugin you think it could be interesting for the package, do not hesitate to open a new issue.

docs/serializers.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ MsgPackSerializer
5454
.. autoclass:: aiocache.serializers.MsgPackSerializer
5555
:members:
5656

57+
.. _yamlserializer:
58+
59+
YamlSerializer
60+
--------------
61+
62+
.. autoclass:: aiocache.serializers.YamlSerializer
63+
:members:
64+
5765
In case the current serializers are not covering your needs, you can always define your custom serializer as shown in ``examples/serializer_class.py``:
5866

5967
.. literalinclude:: ../examples/serializer_class.py
@@ -66,4 +74,4 @@ You can also use marshmallow as your serializer (``examples/marshmallow_serializ
6674
:language: python
6775
:linenos:
6876

69-
By default cache backends assume they are working with ``str`` types. If your custom implementation transform data to bytes, you will need to set the class attribute ``encoding`` to ``None``.
77+
By default cache backends assume they are working with ``str`` types. If your custom implementation transform data to bytes, you will need to set the class attribute ``encoding`` to ``None``.

0 commit comments

Comments
 (0)