1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-03 16:35:25 +00:00

[v2.10] SQL cache backports (#435)

Co-authored-by: Tom Lebreux <tom.lebreux@suse.com>
This commit is contained in:
Silvio Moioli
2025-01-11 12:26:12 +01:00
committed by GitHub
parent a672f2f12a
commit c48ac64c4d
6 changed files with 158 additions and 24 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
}