Skip to content

Cache dynamic response codes (HTTP-statuses like 403 and etc) #3376

@lon9man

Description

@lon9man

Is your feature request related to a problem? Please describe.
i saw pull request about similar functionality with hardcoded status-list.

what do you think about some option to adjust statuses, which should be cacheable?

current list:

private val CACHEABLE_STATUS_CODES = setOf(300, 301, 404, 405, 410, 414, 501)

in the reality AWS S3 returns 403 status, when file is not available. and it is very high chance, that it will not be available forever.

Describe the solution you'd like
so Coil should cache requests with such dynamic statuses-list. it will be very helpful!

to reload such file from S3 developer can add some version as query-parameter

https://example.com?version=yyyymmdd

for now i am implementing custom logic to cache such statuses, which messes original logic in multiple places.

thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions