asolfre / appengine-rest-server

Automatically exported from code.google.com/p/appengine-rest-server
Other
0 stars 0 forks source link

Paging and memcache #76

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm wondering what will happen when i use caching and paging at the same time.

Will there be a issue of pages getting "out of sync?"
(page 1 has old info and page2 has current info etc)

When one page memcache is deleted, shouldn't at the same time all other pages 
memcache be deleted to keep them synchronized?

Thanks

Original issue reported on code.google.com by muijsenb...@gmail.com on 27 Feb 2013 at 1:28

GoogleCodeExporter commented 9 years ago
currently, the caching in the rest server (if enabled) is pretty "dumb".  it 
doesn't make any attempt to proactively delete data other than adding a timeout 
to the cached data.  as such, the caching is really only recommended for models 
which change relatively infrequently or where stale data doesn't present an 
issue.

as an alternative, you can build the caching into the client layer and use the 
etags support to check the server for changes.  this won't remove datastore 
lookup times, but will remove transport costs of unchanged data.

Original comment by jahlborn@gmail.com on 28 Feb 2013 at 3:49