Merge pull request #71 from robrobinbin/patch-1

Lower number of cached items
This commit is contained in:
Spike 2021-01-24 16:22:58 +00:00 committed by GitHub
commit e901e99278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ pub async fn error(msg: String) -> HttpResponse {
}
// Make a request to a Reddit API and parse the JSON response
#[cached(size=1000,time=60, result = true)]
#[cached(size=100,time=60, result = true)]
pub async fn request(path: String) -> Result<Value, String> {
let url = format!("https://www.reddit.com{}", path);
let user_agent = format!("web:libreddit:{}", env!("CARGO_PKG_VERSION"));