Baseflow / Baseflow/flutter_cache_manager

Cache 204 - No content

Open
#333 7 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Dart
Stars
809
Forks
510
Avg merge
6m
Merged PRs (30d)
1

Description

## 💬 Questions and Help

If I understand the code correctly currently only 200 and 202 status codes are added to the cache.

https://github.com/Baseflow/flutter_cache_manager/blob/c7881776325441f3900277499615981c40d12284/flutter_cache_manager/lib/src/web/web_helper.dart#L23-L24

In my case I have a image API endpoint which *tries* to generate a image/logo/etc. based on a user-provided website URL. Since the user input could just as well be an internal URL or just broken, it is perfectly fine for the endpoint to return a 404 response. Right now this is not cached on the client side but requested every time.

Is this the intended behavior, or any way to cache non-existent URLs?

Contributor guide

Open the contributing guide

Research direction

Read lib/src/web/web_helper.dart at the linked lines to confirm which HTTP status codes are currently cached. Clarify whether the requested behavior covers 204, 404, or other non-success responses, then verify that the selected behavior prevents repeated requests for the reported image API case.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
mobile-dev, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.