You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
performance difference when setting the initial values to positive or negative on the session
Example when i set the "expire_after=EXPIRE_IMMEDIATELY" or "expire_after=1" on the session and then a specific request to expire_after=5000; then i make 1k requests , the pages per second loads using tdqm is slow like 20 iterations/second.
However "expire_after=-1" or "expire_after=None" on the session; and try the same long cache 1k requests with speeds being 400 iterations/second.
however if set this to -1 in session the long cache requests work but it seems to break no cache requests and makes them cache and not update as needed; setting refresh=True doesnt seem to help . seems like once i apply expire_after=5000; it retains it and ignores the setting next time i apply expire_after=1;
Expected behavior
when setting the expire_after= in the main session the performance is expected to be consistent
Steps to reproduce the behavior
i set the session variable for most requests but want to be able to modify/extend the cache for specific sets of request.
Example:
SESSION = CachedSession('request_cache',expire_after=EXPIRE_IMMEDIATELY,backend=SQLiteCache(use_memory=True),allowable_codes=[200],allowable_methods=['GET', 'PATCH'],stale_if_error=True) #
Slow when setting specific values on a particular request :
SESSION.get(url, params=payload,expire_after=5000)
Workarounds
none
Environment
requests-cache version: (1.1.0)
Python version: : - 3.11
Platform:: - windows 11
The text was updated successfully, but these errors were encountered:
The problem
performance difference when setting the initial values to positive or negative on the session
Example when i set the "expire_after=EXPIRE_IMMEDIATELY" or "expire_after=1" on the session and then a specific request to expire_after=5000; then i make 1k requests , the pages per second loads using tdqm is slow like 20 iterations/second.
However "expire_after=-1" or "expire_after=None" on the session; and try the same long cache 1k requests with speeds being 400 iterations/second.
however if set this to -1 in session the long cache requests work but it seems to break no cache requests and makes them cache and not update as needed; setting refresh=True doesnt seem to help . seems like once i apply expire_after=5000; it retains it and ignores the setting next time i apply expire_after=1;
Expected behavior
when setting the expire_after= in the main session the performance is expected to be consistent
Steps to reproduce the behavior
i set the session variable for most requests but want to be able to modify/extend the cache for specific sets of request.
Example:
SESSION = CachedSession('request_cache',expire_after=EXPIRE_IMMEDIATELY,backend=SQLiteCache(use_memory=True),allowable_codes=[200],allowable_methods=['GET', 'PATCH'],stale_if_error=True) #
Slow when setting specific values on a particular request :
SESSION.get(url, params=payload,expire_after=5000)
Workarounds
none
Environment
The text was updated successfully, but these errors were encountered: