koraktor / steam-condenser

A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers
https://koraktor.de/steam-condenser
Other
356 stars 67 forks source link

WebApi requests being cached #240

Closed bfosberry closed 10 years ago

bfosberry commented 10 years ago

This is a bit of an open ended issue, I have added some custom code to the ruby bindings to track current game location, however this location does not get updated. It behaves VERY similarly to caching, the first time the request is made, valid data is pulled down, however on subsequent requests older data is returned.

What kind of caching is applied to requests? I tried disabling the cachable macro on steam_id.rb.

Here is the code I'm using: https://github.com/bfosberry/steam-condenser-ruby/compare/koraktor:master...summaries

koraktor commented 10 years ago

Requests itself are not cached in code, but may be cached by a proxy or something similar.

The Cacheable module in the Ruby code only applies to .new calls of the affected classes and can always be overridden by calling #fetch on an existing instance or adding true as the bypass_cache parameter on .new.

bfosberry commented 10 years ago

Gotcha, I'll try that instead of removing the macro. Is there a way to log requests made to steam and responses?

koraktor commented 10 years ago

@bfosberry Sorry for the late reply. The current stable code does (i.e. the gem or 1.3-stable) will log if $DEBUG ist true. The code in master will log using SteamCondenser::Logging.

bfosberry commented 10 years ago

Oh nice, ty sir!

koraktor commented 10 years ago

Closing this as it's not a real problem.