summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-09-09 18:19:37 +0000
committerGerrit Code Review <review@openstack.org>2022-09-09 18:19:37 +0000
commitb766a69f4a0709ed245f68afe3fca7564ba8c8a4 (patch)
tree07308d228baf5df97327edcfc8ed876b740eccb1
parentf3b84c92e85d6c02baf5fa8aaa7412c658c7f8a9 (diff)
parent10e8e77a92455fb638dcc7e73c044cd22acd84ad (diff)
downloadoslo-db-b766a69f4a0709ed245f68afe3fca7564ba8c8a4.tar.gz
Merge "types: Set 'cache_ok' (redux)"
-rw-r--r--oslo_db/sqlalchemy/types.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/oslo_db/sqlalchemy/types.py b/oslo_db/sqlalchemy/types.py
index a86f5ac..fe40bbd 100644
--- a/oslo_db/sqlalchemy/types.py
+++ b/oslo_db/sqlalchemy/types.py
@@ -69,6 +69,8 @@ class JsonEncodedDict(JsonEncodedType):
"""
type = dict
+ cache_ok = True
+ """This type is safe to cache."""
class JsonEncodedList(JsonEncodedType):
@@ -81,6 +83,8 @@ class JsonEncodedList(JsonEncodedType):
"""
type = list
+ cache_ok = True
+ """This type is safe to cache."""
class SoftDeleteInteger(TypeDecorator):
@@ -120,9 +124,11 @@ class String(_String):
mysql_ndb_type is used to override the String with another data type.
mysql_ndb_size is used to adjust the length of the String.
-
"""
+ cache_ok = True
+ """This type is safe to cache."""
+
def __init__(
self, length, mysql_ndb_length=None, mysql_ndb_type=None, **kw):
"""Initialize options."""