{"action":"created","issue":{"url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/875","repository_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm","labels_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/875/labels{/name}","comments_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/875/comments","events_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/875/events","html_url":"https://github.com/JustArchi/ArchiSteamFarm/issues/875","id":348599847,"node_id":"MDU6SXNzdWUzNDg1OTk4NDc=","number":875,"title":"Cached version of !owns / !ownsall","user":{"login":"felipe19930","id":35700659,"node_id":"MDQ6VXNlcjM1NzAwNjU5","avatar_url":"https://avatars3.githubusercontent.com/u/35700659?v=4","gravatar_id":"","url":"https://api.github.com/users/felipe19930","html_url":"https://github.com/felipe19930","followers_url":"https://api.github.com/users/felipe19930/followers","following_url":"https://api.github.com/users/felipe19930/following{/other_user}","gists_url":"https://api.github.com/users/felipe19930/gists{/gist_id}","starred_url":"https://api.github.com/users/felipe19930/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipe19930/subscriptions","organizations_url":"https://api.github.com/users/felipe19930/orgs","repos_url":"https://api.github.com/users/felipe19930/repos","events_url":"https://api.github.com/users/felipe19930/events{/privacy}","received_events_url":"https://api.github.com/users/felipe19930/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-08T07:02:03Z","updated_at":"2018-08-08T07:56:25Z","closed_at":null,"author_association":"NONE","body":"## Feature request\r\n\r\n### Purpose\r\n\r\nTo have a much faster alternative for `!owns` and, most importantly, `!ownsall`.\r\n\r\n### Solution\r\n\r\nHere's a scenario where this new command is already implemented. Let's call it`!ownscache`.\r\n\r\n1. User starts ASF as usual\r\n2. User runs `!owns bot 730`\r\n3. ASF makes an API request to get the game list, then caches it in some file\r\n4. Now user runs `!ownscache bot 740`\r\n5. ASF will now search the game in cache, instead of making a new request to the API, returning data much faster and consequently not wasting bandwidth\r\n\r\n### Why currently available solutions are not sufficient?\r\n\r\nMy internet connection is behind a [CGN](https://en.wikipedia.org/wiki/Carrier-grade_NAT), meaning I share the same IP address with a bunch of other unknown people, which makes Steam servers block a lot of requests made by ASF, so I frequently get warnings like this:\r\n\r\n```\r\n2018-08-08 03:33:00|dotnet-4096|WARN|bot|Init() System.Net.Http.HttpRequestException: Response status code does not indicate success: 429 (Too Many Requests).\r\n```\r\n\r\nSo besides `!ownsall` taking about 2 minutes to run on my ~40 bots, I often get results like this:\r\n\r\n```\r\n<bot22> ownedGames is empty!\r\n...\r\n<bot25> ownedGames is empty!\r\n...\r\n<bot30> ownedGames is empty!\r\n...\r\n<bot33> ownedGames is empty!\r\n```\r\n\r\nSo in that case, I'd have to run the `!owns` command on the failed bots, which is a bit frustrating and time consuming thing to do. I even have `WebLimiterDelay` set to `2000`, but it doesn't seem to make much of a difference in regards of the `429 (Too Many Requests)` error.\r\n\r\n### Does your suggestion fall into ASF scope?\r\n\r\nI believe so, yes.\r\n\r\n### Is your suggestion abiding to Steam guidelines?\r\n\r\nYes.\r\n\r\n### Additional info\r\n\r\nNone."},"comment":{"url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/comments/411320507","html_url":"https://github.com/JustArchi/ArchiSteamFarm/issues/875#issuecomment-411320507","issue_url":"https://api.github.com/repos/JustArchi/ArchiSteamFarm/issues/875","id":411320507,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTMyMDUwNw==","user":{"login":"felipe19930","id":35700659,"node_id":"MDQ6VXNlcjM1NzAwNjU5","avatar_url":"https://avatars3.githubusercontent.com/u/35700659?v=4","gravatar_id":"","url":"https://api.github.com/users/felipe19930","html_url":"https://github.com/felipe19930","followers_url":"https://api.github.com/users/felipe19930/followers","following_url":"https://api.github.com/users/felipe19930/following{/other_user}","gists_url":"https://api.github.com/users/felipe19930/gists{/gist_id}","starred_url":"https://api.github.com/users/felipe19930/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipe19930/subscriptions","organizations_url":"https://api.github.com/users/felipe19930/orgs","repos_url":"https://api.github.com/users/felipe19930/repos","events_url":"https://api.github.com/users/felipe19930/events{/privacy}","received_events_url":"https://api.github.com/users/felipe19930/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T07:56:25Z","updated_at":"2018-08-08T07:56:25Z","author_association":"NONE","body":"@Abrynos I know the list can change, but once a user ran !owns again (when they know the game list is outdated), ASF would simply make a new request and then update the cache file. Also, this feature is NOT a replacement to !owns, at all. That's why I proposed a new command, !ownscache or whaetever. If a user keeps running !owns instead of !ownscache, ASF will just ignore the cache file and request the API like always..."}}
{"actor":{"display_login":"felipe19930"}}