Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change cache of ArchiveField #55

Merged
merged 3 commits into from
Aug 11, 2023

Commits on Aug 10, 2023

  1. fix: change cache of ArchiveField

    These changes are similar to codecov/codecov-api#72
    Same reasoning applies.
    giovanni-guidini committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    3331efc View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. fix: update archive field cache

    * Set varialbe cached_value property name, for the case were a single model might have
    multiple archived fields
    * Concentrate all archive getting/setting in the `__get__` and `__set__` functions
    
    The test changed happens because now we update the cache on the write. Because of that we
    are not doing the encode/decode/rehydrate operations. So the data you put in is the data you get.
    On one hand we can do such operations to guarantee consistency. On the other this is no different than
    what we used before `ArchiveField` AND such operations might be expensive.
    giovanni-guidini committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    37a31fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1558f14 View commit details
    Browse the repository at this point in the history