Skip to content
pubscout

web_cache_clear

0.0.3, released a year ago by an unverified publisher

Flutter web plugin that clears session storage and reloads the page when app version changes.

WASM-ready
$ flutter pub add web_cache_clear
Source repository

What it does

Provides a single method to compare a supplied version string with one stored in the browser's session storage. If they differ, it clears the session storage and forces a page reload, ensuring users see the latest web app version.

AI-written summary of version 0.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to guarantee users load the newest version of a Flutter web app after a deployment
  • You want to automatically clear stale session data on version change without manual user action

Skip it when

  • The app runs on mobile or desktop platforms
  • You need to preserve session data across version updates
  • You require more granular cache control beyond session storage

Strengths

  • Very small and easy to integrate
  • Works on HTTPS as well as localhost
  • No native code or platform-specific setup

Weaknesses

  • Only works on web platforms
  • Clears only session storage, not other caches
  • Limited configurability

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:web_cache_clear/web_cache_clear.dart';

@override
void initState() {
  super.initState();
  WebCacheClear().checkAppVersion('1.0.3');
}

Alternatives

Packages that do the same job and could replace web_cache_clear.

  • flutter_cache_manager

    Provides broader cache management for files and assets, useful if you need more than just session storage clearing

Works with

Packages commonly used together with web_cache_clear: ones it builds on, ones built on it, and its own family.