Mojolicious-Plugin-ServiceWorker

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

As above, except the matching URL will never be re-checked. Use only
where you cache-bust by including a hash in the filename.

## network\_first

As above, except the matching URL will be fetched from the network
every time and used if possible. The cached value will only be used if
that fails.

**Any URL not matching these three criteria** will be treated with a
"cache first" strategy, also known as "stale while revalidate": the cached
version will immediately by returned to the web client for performance,
but also fetched over the network and re-cached for freshness.

# HELPERS

## serviceworker.route

    my $route_name = $c->serviceworker->route;

The configured ["route\_sw"](#route_sw) route.

lib/Mojolicious/Plugin/ServiceWorker.pm  view on Meta::CPAN

As above, except the matching URL will never be re-checked. Use only
where you cache-bust by including a hash in the filename.

=head2 network_first

As above, except the matching URL will be fetched from the network
every time and used if possible. The cached value will only be used if
that fails.

B<Any URL not matching these three criteria> will be treated with a
"cache first" strategy, also known as "stale while revalidate": the cached
version will immediately by returned to the web client for performance,
but also fetched over the network and re-cached for freshness.

=head1 HELPERS

=head2 serviceworker.route

  my $route_name = $c->serviceworker->route;

The configured L</route_sw> route.



( run in 2.705 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )