Skip to content

Doesn't have cache_ok = True which can have significant performance implications #7

@felipe-cerqueira

Description

@felipe-cerqueira

While using sqlalchemy_enum34 I've seen the following error message:
SAWarning: TypeDecorator Enum('CREATED', 'RETRY', 'EXPIRED', 'FINISHED') will not produce a cache key because the cache_ok attribute is not set to True. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)

Apparently, only adding cache_ok = True would solve the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions