Skip to content

Commit

Permalink
adding additional options for caching
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Jun 4, 2024
1 parent e7b686f commit cee409f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
### Added
- New `Caching` service for manifest data and new options to flush cache from the settings.
- Input number validation for allowed keys.
- WP Rocket cache options settings.

### Fixed
- Custom post type labels are not translatable.
Expand Down
10 changes: 9 additions & 1 deletion src/Blocks/components/form/assets/enrichment.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class Enrichment {
return;
}

if (!newStorage) {
if (!localStorage || !newStorage) {
return;
}

Expand Down Expand Up @@ -228,6 +228,10 @@ export class Enrichment {
return null;
}

if (!localStorage) {
return null;
}

return localStorage?.getItem(storageName);
}

Expand All @@ -243,6 +247,10 @@ export class Enrichment {
return;
}

if (!localStorage) {
return;
}

localStorage?.removeItem(storageName);
}

Expand Down

0 comments on commit cee409f

Please sign in to comment.