Why NOT use memcached? Thats what it’s for If you run out of space,
it will purge old items, you’ll get a cache miss, and just rerequest
it from the api… (just make sure you test for cache thrashing -
constant misses - and rethink if you are doing this)
You could also (depending on your language) deserialize the results
into objects, and use those objects… basically, build up an in
memory database…
or better yet, use sqlite, which is often an in memory database
(depending on how you set it up)
What language are you using this in? What context (web app process,
service/daemon, mobile app, etc)?
Serializing it to disk (or just throwing the xml/json on disk) would
work too, but really, its just a larger, more persistant and much,
MUCH slower version of memcached.On Mon, Oct 17, 2011 at 01:12, Ollie me@ollieread.com wrote:
Hai there,
The guys who run the Freeagent twitter account told me to drop on down
here and ask about caching.
I’m working on a system that uses the Freeagent API will be doing a
fair few API calls.
My initial thought was to use memcache but because of the size of the
data I don’t think that’d be appropriate.
My second thought was to save the results as xml files and set an
expiry time within the code for each type of call, and obviously when
the data was updated via my system.
Just wanted to know if you guys have any better thoughts on it, like
methods you’ve used.
Regards
Ollie
–
You received this message because you are subscribed to the Google Groups “FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to freeagent_api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freeagent_api?hl=en.
Nic Wise
t. +44 7788 592 806 | @fastchicken | Nic Wise - Tend Health Ltd | LinkedIn
b. http://www.fastchicken.co.nz/
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2