1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-01 15:37:31 +00:00

[v2.9] SQL cache backports (#431)

Co-authored-by: Tom Lebreux <me@tomlebreux.com>
Co-authored-by: Tom Lebreux <tom.lebreux@suse.com>
This commit is contained in:
Silvio Moioli
2025-01-10 08:48:48 +01:00
committed by GitHub
parent a2116cfa52
commit b88abd9aa0
6 changed files with 1822 additions and 143 deletions

View File

@@ -108,7 +108,7 @@ func isListOrGetable(schema *types.APISchema) bool {
return false
}
func isListWatchable(schema *types.APISchema) bool {
func IsListWatchable(schema *types.APISchema) bool {
var (
canList bool
canWatch bool
@@ -163,7 +163,7 @@ func (h *handler) refreshAll(ctx context.Context) error {
filteredSchemas := map[string]*types.APISchema{}
for _, schema := range schemas {
if isListWatchable(schema) {
if IsListWatchable(schema) {
if preferredTypeExists(schema, schemas) {
continue
}