import { get, set } from "../../../cache/memory/index.js";
import { AbstractGithubGraphqlCacheStrategy } from "./abstract-cache-strategy.js";
//#region lib/util/github/graphql/cache-strategies/memory-cache-strategy.ts
/**
* In-memory strategy meant to be used for private packages
* and for testing purposes.
*/
var GithubGraphqlMemoryCacheStrategy = class extends AbstractGithubGraphqlCacheStrategy {
	fullKey() {
		return `github-graphql-cache:${this.cacheNs}:${this.cacheKey}`;
	}
	load() {
		const res = get(this.fullKey());
		return Promise.resolve(res);
	}
	persist(cacheRecord) {
		set(this.fullKey(), cacheRecord);
		return Promise.resolve();
	}
};
//#endregion
export { GithubGraphqlMemoryCacheStrategy };

//# sourceMappingURL=memory-cache-strategy.js.map