New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restart, clears the data stored on disk #47

Closed
wku opened this Issue Feb 3, 2015 · 3 comments

Comments

2 participants
@wku

wku commented Feb 3, 2015

from tinydb import TinyDB, where
from tinydb.storages import JSONStorage, Storage
from tinydb.middlewares import CachingMiddleware, Middleware
db = TinyDB('db1.json', storage=CachingMiddleware(JSONStorage))
print db.all()

[]

db.insert({'test': 1})
db.close()
print db.all()

[{'test': 1}]

msiemens added a commit that referenced this issue Feb 3, 2015

Fix problem with caching and existing data
�CachingMiddleware somehow assumed that there is no data already stored
in the database. Now we always read it �from the wrapped storage if possible.

Closes �#47
@msiemens

This comment has been minimized.

Show comment
Hide comment
@msiemens

msiemens Feb 3, 2015

Owner

Thanks for reporting! This should be fixed in 45a4d4b. Can you confirm this?

Owner

msiemens commented Feb 3, 2015

Thanks for reporting! This should be fixed in 45a4d4b. Can you confirm this?

@wku

This comment has been minimized.

Show comment
Hide comment
@wku

wku Feb 7, 2015

thank, everything works.

wku commented Feb 7, 2015

thank, everything works.

@msiemens msiemens closed this Feb 12, 2015

@msiemens

This comment has been minimized.

Show comment
Hide comment
@msiemens

msiemens Feb 12, 2015

Owner

Great! I've just released v2.2.2, where this is fixed :)

Owner

msiemens commented Feb 12, 2015

Great! I've just released v2.2.2, where this is fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment