Skip to content

feat: invalidate cache on web uploads and opds downloads and add Clear Cache action#393

Merged
daveallie merged 4 commits intocrosspoint-reader:masterfrom
lgarbarini:fix-invalidate-cache
Jan 21, 2026
Merged

feat: invalidate cache on web uploads and opds downloads and add Clear Cache action#393
daveallie merged 4 commits intocrosspoint-reader:masterfrom
lgarbarini:fix-invalidate-cache

Conversation

@lgarbarini
Copy link
Contributor

@lgarbarini lgarbarini commented Jan 16, 2026

Summary

When uploading or downloading an updated ebook from SD/WebUI/OPDS with same the filename the .crosspoint cache is not cleared. This can lead to issues with the Table of Contents and hangs when switching between chapters.

I encountered this issue in two places:

  • When I need to do further ePub cleaning using Calibre after I load an ePub and find that some of its formatting should be cleaned up. When I reprocess the same book and want to place it back in the same location I need a way to invalidate the cache.
  • When syncing RSS feed generated epubs. I generate news ePubs with filenames like news-outlet.epub and so every day when I fetch new news the crosspoint cache needs to be cleared to load that file.

This change offers the following features:

  • On web uploads, if the file already exists, the cache for that file is cleared
  • On OPDS downloads, if the file already exists, the cache for that file is cleared
  • There's now an action for Clear Cache in the Settings page which can clear the cache for all books

Addresses #281


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? PARTIALLY

@lgarbarini lgarbarini changed the title fix: invalidate cache on web uploads and opds downloads feat/fix: invalidate cache on web uploads and opds downloads and add Clear Cache action Jan 16, 2026
@lgarbarini lgarbarini changed the title feat/fix: invalidate cache on web uploads and opds downloads and add Clear Cache action feat: invalidate cache on web uploads and opds downloads and add Clear Cache action Jan 16, 2026
@lgarbarini lgarbarini force-pushed the fix-invalidate-cache branch from c80e059 to 9fc1905 Compare January 16, 2026 08:00
@itsthisjustin
Copy link
Contributor

Would love some more details on the why behind this

@lgarbarini
Copy link
Contributor Author

Would love some more details on the why behind this

Updated description

@lukestein
Copy link
Contributor

lukestein commented Jan 17, 2026

Another place this is useful is that after installing dev builds of the firmware I sometimes need to rebuild the cache. Getting tired of sd card eject and rm

@daveallie daveallie merged commit d399afb into crosspoint-reader:master Jan 21, 2026
1 check passed
jdk2pq added a commit to jdk2pq/crosspoint-reader that referenced this pull request Jan 23, 2026
* master:
  chore: Cut release 0.15.0
  fix: OPDS browser OOM (crosspoint-reader#403)
  docs: Add detailed webserver documentation (crosspoint-reader#446)
  feat: invalidate cache on web uploads and opds downloads and add Clear Cache action (crosspoint-reader#393)
  fix: hard reset via RTS pin after flashing firmware (crosspoint-reader#437)
  fix: Skip negative screen coordinates only after we read the bitmap row. (crosspoint-reader#431)
  Reclaim space if we don't show battery Percentage (crosspoint-reader#352)
  feat: Include superscripts and subscripts in fonts (crosspoint-reader#463)
  My Library: Tab bar w/ Recent Books + File Browser (crosspoint-reader#250)
  feat: adding categories to settings screen (crosspoint-reader#331)
yingirene pushed a commit to yingirene/crosspoint-reader that referenced this pull request Jan 25, 2026
…r Cache action (crosspoint-reader#393)

## Summary

When uploading or downloading an updated ebook from SD/WebUI/OPDS with
same the filename the `.crosspoint` cache is not cleared. This can lead
to issues with the Table of Contents and hangs when switching between
chapters.

I encountered this issue in two places:
- When I need to do further ePub cleaning using Calibre after I load an
ePub and find that some of its formatting should be cleaned up. When I
reprocess the same book and want to place it back in the same location I
need a way to invalidate the cache.
- When syncing RSS feed generated epubs. I generate news ePubs with
filenames like `news-outlet.epub` and so every day when I fetch new news
the crosspoint cache needs to be cleared to load that file.

This change offers the following features:
- On web uploads, if the file already exists, the cache for that file is
cleared
- On OPDS downloads, if the file already exists, the cache for that file
is cleared
- There's now an action for `Clear Cache` in the Settings page which can
clear the cache for all books


Addresses
crosspoint-reader#281

---

### 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? PARTIALLY

---------

Co-authored-by: Dave Allie <[email protected]>
Unintendedsideeffects pushed a commit to Unintendedsideeffects/crosspoint-reader that referenced this pull request Feb 17, 2026
…r Cache action (crosspoint-reader#393)

## Summary

When uploading or downloading an updated ebook from SD/WebUI/OPDS with
same the filename the `.crosspoint` cache is not cleared. This can lead
to issues with the Table of Contents and hangs when switching between
chapters.

I encountered this issue in two places:
- When I need to do further ePub cleaning using Calibre after I load an
ePub and find that some of its formatting should be cleaned up. When I
reprocess the same book and want to place it back in the same location I
need a way to invalidate the cache.
- When syncing RSS feed generated epubs. I generate news ePubs with
filenames like `news-outlet.epub` and so every day when I fetch new news
the crosspoint cache needs to be cleared to load that file.

This change offers the following features:
- On web uploads, if the file already exists, the cache for that file is
cleared
- On OPDS downloads, if the file already exists, the cache for that file
is cleared
- There's now an action for `Clear Cache` in the Settings page which can
clear the cache for all books


Addresses
crosspoint-reader#281

---

### 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? PARTIALLY

---------

Co-authored-by: Dave Allie <[email protected]>
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.

4 participants