You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: glue.go
    path of file: ./repos/cloudfox/aws/sdk
    
    the code of the file until where you have to start completion: package sdk

import (
	"context"
	"encoding/gob"
	"errors"

	"github.com/BishopFox/cloudfox/internal"
	"github.com/BishopFox/cloudfox/internal/aws/policy"
	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/service/glue"
	glueTypes "github.com/aws/aws-sdk-go-v2/service/glue/types"
	"github.com/patrickmn/go-cache"
)

type AWSGlueClientInterface interface {
	ListDevEndpoints(ctx context.Context, params *glue.ListDevEndpointsInput, optFns ...func(*glue.Options)) (*glue.ListDevEndpointsOutput, error)
	ListJobs(ctx context.Context, params *glue.ListJobsInput, optFns ...func(*glue.Options)) (*glue.ListJobsOutput, error)
	GetTables(ctx context.Context, params *glue.GetTablesInput, optFns ...func(*glue.Options)) (*glue.GetTablesOutpu
    
func CachedGlueGetDatabases(GlueClient AWSGlueClientInterface, accountID string, region string) ([]glueTypes.Database, error) {
	var PaginationControl *string
	var databases []glueTypes.Database
	cacheKey := "glue-GetDatabases-" + accountID + "-" + region
	cached, found := internal.Cache.Get(cacheKey)
	if found {
		sharedLogger.Debug("Using cached Glue databases data")
		return cached.([]glueTypes.Database), nil
	}

	for {
		GetDatabases, err := GlueClient.GetDatabases(
			context.TODO(),
			&glue.GetDatabasesInput{
				NextToken: PaginationControl,
			},
			func(o *glue.Options) {
				o.Region = region
			},
		)
		if err != nil {
			sharedLogger.Error(err.Error())
			break
		}

		databases = append(databases, GetDatabases.DatabaseList...)

		// Pagination control.
		if GetDatabases.NextToken != nil {
			PaginationControl = GetDatabases.NextToken
		} else {
			PaginationControl = nil
			break
		}
	}

	internal.Cache.Set(cacheKey, databases, cache.DefaultExpiration)

	return databases, nil
}