mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-14 03:18:26 +00:00
Remove unnecessary cache (#40)
The cache was useful trick when the property accesses caused I/O, which is unnecessary now as dev.update() does explicitly cache results until its called again.
This commit is contained in:
@@ -116,8 +116,7 @@ def dev(request):
|
||||
with open(file) as f:
|
||||
sysinfo = json.load(f)
|
||||
model = basename(file)
|
||||
params = {"host": "123.123.123.123", "cache_ttl": 0}
|
||||
p = device_for_file(model)(**params)
|
||||
p = device_for_file(model)(host="123.123.123.123")
|
||||
p.protocol = FakeTransportProtocol(sysinfo)
|
||||
loop.run_until_complete(p.update())
|
||||
yield p
|
||||
|
Reference in New Issue
Block a user