Custom Serialization for Cache: Introduced custom serialization logic for caching responses in serve_manifest and serve_sw endpoints to handle serialization of text-based files, such as manifest.json. This prevents issues related to attempting to cache non-serializable objects and optimizes cache usage for static content.
Refined Cache Strategy for Static Files: Modified caching strategy for static files to ensure that only serializable content is cached, thus avoiding TypeError: cannot pickle 'BufferedReader' instances. This change enhances the reliability of caching mechanisms within the Flask application, reducing server load and improving response times for serving static content.
To use:
Deploy the latest version with Docker:
docker pull jocxfin/pwgen:latest
docker run -d -p 5069:5069 jocxfin/pwgen:latest
Enable offline mode, bypassing external API checks:
Changes:
serve_manifest
andserve_sw
endpoints to handle serialization of text-based files, such asmanifest.json
. This prevents issues related to attempting to cache non-serializable objects and optimizes cache usage for static content.TypeError: cannot pickle 'BufferedReader' instances
. This change enhances the reliability of caching mechanisms within the Flask application, reducing server load and improving response times for serving static content.To use:
Deploy the latest version with Docker:
Enable offline mode, bypassing external API checks:
With environmental variables defining settings:
Quick and straightforward improvements for a better tool.
Fixes #53, fixes #54