Feat: Pagination and palette caching for scale
- Add pagination to products and made-to-order pages (20 per page) - Cache color palette separately for ready-made and personalised - Fix category queries to use select instead of include - Calculate total page count for pagination UI - Add Previous/Next pagination controls Solves N+1 query problem on color palette generation. With 100+ products: - Before: Loading all 10,000 products just for color palette - After: Load palette once (cached 5 mins), show 20 products per page
This commit is contained in:
@@ -154,7 +154,8 @@
|
||||
"PowerShell(Stop-Process -Id 30912 -Force -ErrorAction SilentlyContinue)",
|
||||
"Bash(psql postgresql://postgres:craft2prints@192.168.0.190:5432/craft2prints -c ' *)",
|
||||
"Bash(node scripts/add-indexes.js)",
|
||||
"Bash(curl -s http://127.0.0.1:3000)"
|
||||
"Bash(curl -s http://127.0.0.1:3000)",
|
||||
"Bash(curl -s http://127.0.0.1:3000/products)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user