summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_db/sqlalchemy/types.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/oslo_db/sqlalchemy/types.py b/oslo_db/sqlalchemy/types.py
index 14ea94c..a86f5ac 100644
--- a/oslo_db/sqlalchemy/types.py
+++ b/oslo_db/sqlalchemy/types.py
@@ -21,6 +21,8 @@ class JsonEncodedType(TypeDecorator):
type = None
impl = Text
+ cache_ok = True
+ """This type is safe to cache."""
def __init__(self, mysql_as_long=False, mysql_as_medium=False):
"""Initialize JSON-encoding type."""
@@ -101,6 +103,8 @@ class SoftDeleteInteger(TypeDecorator):
"""
impl = Integer
+ cache_ok = True
+ """This type is safe to cache."""
def process_bind_param(self, value, dialect):
"""Return the binding parameter."""