Skip to content

Fix profiler initialization bug and implement Redis persistence for minified content#14

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/check-improvements
Draft

Fix profiler initialization bug and implement Redis persistence for minified content#14
Copilot wants to merge 4 commits intomainfrom
copilot/check-improvements

Conversation

Copy link

Copilot AI commented Feb 6, 2026

Addresses code quality issues and completes missing functionality in FPC cache implementations.

Critical Fixes

FPC.go profiler logic: Inverted condition prevented profiler from ever starting

- if (false == config.EnableProfile) {
+ if config.EnableProfile {
    initProfiler(config)
}

FPC.js minified content persistence: Implemented TODO to save minified HTML back to Redis, preventing redundant minification on subsequent cache hits

  • Added compressToGzippedBase64() to match Redis storage format
  • Added setRedisValue() with error handling
  • Async background save after minification completes

Code Cleanup

  • Removed duplicate blank import _ "encoding/json" in FPC.go
  • Removed commented-out gunzipSync import in FPC.js
  • Enhanced logging to include cache key in Redis save operations
Original prompt

Check improvements


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 6, 2026 07:15
- Remove unused commented import in FPC.js (gunzipSync)
- Remove duplicate blank import in FPC.go (encoding/json)
- Fix inverted profiler initialization logic in FPC.go
- Implement TODO: Save minified HTML content back to Redis
- Add compressToGzippedBase64 and setRedisValue functions

Co-authored-by: Genaker <9213670+Genaker@users.noreply.github.com>
- Improve logging in setRedisValue to include key for better debugging
- Remove redundant comment in FPC.go profiler initialization

Co-authored-by: Genaker <9213670+Genaker@users.noreply.github.com>
Co-authored-by: Genaker <9213670+Genaker@users.noreply.github.com>
Copilot AI changed the title [WIP] Check for improvements in the codebase Fix profiler initialization bug and implement Redis persistence for minified content Feb 6, 2026
Copilot AI requested a review from Genaker February 6, 2026 07:18
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.

2 participants