Skip to content

Commit

Permalink
Merge pull request #1377 from kajinamit/cache_ok
Browse files Browse the repository at this point in the history
Configure `cache_ok` for TypeDecorator implementation
  • Loading branch information
tobias-urdin authored Mar 15, 2024
2 parents f920904 + 860afd3 commit 06df4ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gnocchi/indexer/sqlalchemy_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class PreciseTimestamp(types.TypeDecorator):
"""

impl = sqlalchemy.DateTime
cache_ok = True

@staticmethod
def _decimal_to_dt(dec):
Expand Down Expand Up @@ -94,6 +95,7 @@ class TimestampUTC(types.TypeDecorator):
"""Represents a timestamp precise to the microsecond."""

impl = sqlalchemy.DateTime
cache_ok = True

def load_dialect_impl(self, dialect):
if dialect.name == 'mysql':
Expand Down

0 comments on commit 06df4ca

Please sign in to comment.