Skip to content

Store caches in a subdirectory whose name matches the app bundle identifier #4543

@zyoshoka

Description

@zyoshoka

The current cache system creates subdirectories directly in ~/Library/Caches. As a result, 3 subdirectories are created:

~/Library/Caches/Favicons
~/Library/Caches/FeedIcons
~/Library/Caches/Images

Such a cache system should be avoided to prevent interference between applications and to make it easier for users and the system to clean up caches. In fact, Apple's documentation includes the following statement:

Cache files should be placed in a directory whose name matches the bundle identifier of the app.
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html

That is, caches should be stored as follows:

~/Library/Caches/com.ranchero.NetNewsWire-Evergreen/Favicons
~/Library/Caches/com.ranchero.NetNewsWire-Evergreen/FeedIcons
~/Library/Caches/com.ranchero.NetNewsWire-Evergreen/Images

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