remove . from tagnames

This commit is contained in:
orangix 2023-08-17 22:39:37 +02:00
parent 33f306472f
commit ff254c1714
No known key found for this signature in database
GPG Key ID: C31D4A86601C8416

View File

@ -21,6 +21,9 @@ type Tag struct {
}
func (client *Client) FetchTag(tag string, sort string, page string) (Tag, error) {
// Dots are automatically removed on Imgur, so more cache hits
tag = strings.ReplaceAll(tag, ".", "")
cacheData, found := client.Cache.Get(tag + sort + page + "-tag")
if found {
return cacheData.(Tag), nil