Skip to content

Commit

Permalink
Fix issue with Redis cache if two similar elements cached
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed Dec 17, 2019
1 parent dec6827 commit 2f52f96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ In findatapy/examples you will find several demos

# Coding log

* 17 Dec 2019
* Fix issue with Redis cache if two similar elements cached (takes the last now)
* 16 Dec 2019
* Fix problem with missing Redis dependency when reading from market
* 04 Dec 2019
Expand Down
5 changes: 3 additions & 2 deletions findatapy/market/ioengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,9 @@ def read_time_series_cache_from_disk(self, fname, engine='hdf5', start_date=None
k = r.keys('comp_*_' + fname_single)

# if so, then it means that we have stored it as a compressed object
if (len(k) == 1):
k = k[0].decode('utf-8')
# if have more than 1 element, take the last (which will be the latest to be added)
if (len(k) >= 1):
k = k[-1].decode('utf-8')

comp = r.get(k)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
tickers, using configuration files. There is also functionality which is particularly useful for those downloading FX market data."""

setup(name='findatapy',
version='0.1.5',
version='0.1.6',
description='Market data library',
author='Saeed Amen',
author_email='saeed@cuemacro.com',
Expand Down

0 comments on commit 2f52f96

Please sign in to comment.