Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Bug in cache key caused the /users view to display a bunch of duplicates #71

@TheNotary

Description

@TheNotary

I hit the bug when I manually generating a bunch of example db entries and didn't realize it would effect you guys, but now that I think about it, every week, the bug would manifest itself due to the new non db backed Fab records.

The code version of the story is that the cache key needed to address the user of the fab in some way, as it stood, it didn't and only respected update_at which clearly isn't enough to cut it.

# notice that this key will be the same for every FAB created at the same moment in time
# regardless if it's for two different users, thus at the beginning of the week, you'll
# see a lot of the same user profile
cache([@fab.updated_at, @fab_editable, adminy?])

The attached PR fixes the bug and re-enables caching to improve app response time tremendously for /users. Let me know if there was another bug you observed preventing use of caching.

caching == cake

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