Skip to content

fix: Destroy CSS Cache file when invalid#1018

Merged
daveallie merged 1 commit intomasterfrom
fix/destroy-css-cache-when-invalidating
Feb 20, 2026
Merged

fix: Destroy CSS Cache file when invalid#1018
daveallie merged 1 commit intomasterfrom
fix/destroy-css-cache-when-invalidating

Conversation

@daveallie
Copy link
Member

Summary

  • Destroy CSS Cache file when invalid

Additional Context

  • Fixes issue where it would attempt to rebuild every book open

AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? No

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

Caution

Review failed

The pull request is closed.

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9faf2a and db3438b.

📒 Files selected for processing (3)
  • lib/Epub/Epub.cpp
  • lib/Epub/Epub/css/CssParser.cpp
  • lib/Epub/Epub/css/CssParser.h

📝 Walkthrough

Walkthrough

The changes refactor CSS cache handling in the EPUB library by introducing a new deleteCache() method, restructuring the parsing flow with early exit optimization, adding validation checks, and simplifying cache rebuild logic in the load() method.

Changes

Cohort / File(s) Summary
CssParser Interface & Implementation
lib/Epub/Epub/css/CssParser.h, lib/Epub/Epub/css/CssParser.cpp
Added new public const method deleteCache() to invalidate cache files, utilizing existing hasCache() and Storage.remove().
EPUB CSS Parsing Logic
lib/Epub/Epub.cpp
Restructured parseCssFiles() with early return when cache exists; added heap and per-file size validation checks; shifted temporary file extraction after size validation; consolidated cache saving after all files processed; simplified load() cache rebuild condition to trigger on cache miss or load failure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • jdk2pq
  • znelson

Comment @coderabbitai help to get the list of available commands and usage tips.

@daveallie daveallie changed the title Destroy CSS Cache file when invalid fix: Destroy CSS Cache file when invalid Feb 20, 2026
@daveallie daveallie merged commit 22b96ec into master Feb 20, 2026
4 of 7 checks passed
daveallie added a commit that referenced this pull request Feb 20, 2026
## Summary

* Destroy CSS Cache file when invalid

## Additional Context

* Fixes issue where it would attempt to rebuild every book open

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? No
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 20, 2026
## Summary

* Destroy CSS Cache file when invalid

## Additional Context

* Fixes issue where it would attempt to rebuild every book open

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? No
@daveallie daveallie deleted the fix/destroy-css-cache-when-invalidating branch February 22, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant