Skip to content

Update Cache docs to mention that it's not thread safe and should be a singleton #8083

@odbol

Description

@odbol

Quite a few people have been running into some concurrency issues with Cache (see #8080, #3938, #6280, voghDev/PdfViewPager#175, etc).

Most likely for all of them they are either creating more than one Cache object on the same directory/file, or accessing it from different threads. But it's not clear from the docs that this would cause a problem.

The doc comment for Cache should be updated to mention that it is not thread-safe and that only one Cache object per directory should be created (i.e. make it a singleton).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions