/** * Generate a cache key for the repository and return it * * @param Repository $repo * @return string */ function cache_repository_key(Repository $repo) { $key = cache_key($repo); $cached = get_repository_key_cache(); $cached["{$repo->user}/{$repo->name}"] = $key; set_transient('ms_cached_repos', $cached, DAY_IN_SECONDS); return $key; }
/** * Render the options form */ function options_page() { $repositories = get_repository_key_cache(); require_once __DIR__ . '/options-form.php'; }