chore: cache namespace

This commit is contained in:
Phan An 2024-03-22 16:33:18 +01:00
parent 8cac5219e3
commit 670157def1
2 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,7 @@ class ITunesService
$hash = md5(serialize($request->query()));
return $this->cache->remember(
"itunes:track:$hash",
"itunes.track.$hash",
now()->addWeek(),
function () use ($request): ?string {
$response = $this->connector->send($request)->object();

View file

@ -50,7 +50,7 @@ class LastfmService implements MusicEncyclopedia
return attempt_if(static::enabled(), function () use ($artist): ?ArtistInformation {
return $this->cache->remember(
"lastfm:artist:$artist->id",
"lastfm.artist.$artist->id",
now()->addWeek(),
fn () => $this->connector->send(new GetArtistInfoRequest($artist))->dto()
);
@ -65,7 +65,7 @@ class LastfmService implements MusicEncyclopedia
return attempt_if(static::enabled(), function () use ($album): ?AlbumInformation {
return $this->cache->remember(
"lastfm:album:$album->id",
"lastfm.album.$album->id",
now()->addWeek(),
fn () => $this->connector->send(new GetAlbumInfoRequest($album))->dto()
);