load-with-freshness

Caches API data with freshness windows to eliminate redundant calls in Flutter Cubit/Bloc apps.

7|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/marcglasberg/bloc_superpowers --skill load-with-freshness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: load-with-freshness
Source: https://github.com/marcglasberg/bloc_superpowers/tree/main/.claude/skills/load-with-freshness
Command: npx skills add https://github.com/marcglasberg/bloc_superpowers --skill load-with-freshness

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Eliminate redundant API calls by caching data with a defined freshness window.

Core Features & Use Cases

  • Caching data for a configurable freshness period to reduce unnecessary loads
  • Per-item freshness capabilities and force refresh option
  • Seamless integration with Cubit/Bloc patterns to streamline data loading in Flutter apps

Quick Start

Instantiate your Cubit and call loadProfile() on screen entry to load data with freshness.

Frequently Asked Questions about load-with-freshness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I cache API data in Flutter to skip redundant API calls?

You can cache API data in Flutter by implementing a freshness window that defines how long data remains valid, skipping redundant API calls until the cache expires. This approach uses configurable freshness periods to manage validity.

What is the best way to manage UI data caching with Cubit and Bloc in Flutter?

Managing UI data caching with Cubit and Bloc is best handled by integrating freshness windows that emit updated state automatically. This approach seamlessly integrates with Cubit/Bloc patterns to streamline data loading and state emission.

Can I force a refresh to ignore cache freshness for specific items in Flutter?

Yes, you can force a refresh to ignore cache freshness for specific items in Flutter. The caching mechanism provides per-item freshness capabilities and an ignoreFresh option to bypass the cache window when needed.

How does a freshness window work for caching profiles and settings in Flutter?

A freshness window for caching profiles and settings in Flutter works by keeping cached data valid for a defined period, such as via a freshFor parameter. This prevents unnecessary API calls while data remains current.

When should I use per-item keys for API caching in Flutter apps?

You should use per-item keys for API caching in Flutter apps when you need individual data entries, like specific profiles or catalog items, to have independent freshness windows. This allows granular control over cache expiration.