I have to use memcache to store some values frequently accessible by
application I am working on.
The Google App Engine Memcache doesn't work as it apparently removes
values after a couple of minutes I store it at memcache.
I really need any idea and would highly appreciate for any comments.
I have already tried to ask here, but got response that I need to
store values as soon as I read them and didn't work.
I am still losing my values...
If you post your code we might be able to help, but I assure you Memcache
does work.
My app does reads from the datastore or memcache for every request,
sometimes to for initialization of variables... like Who am I, Why am I
here, what configuration am I in. And then to serve the request...
We use a combination of instance memory and memcache to not have to talk to
the data store. Datastore reads are "slow" compared to Instance Memory and
Memcache.
Datastore Write Operations 0.24 Million Ops 0.19
$1.00/ Million Ops $0.19
Datastore Read Operations 0.02 Million Ops 0.00
$0.70/ Million Ops $0.00
I didn't count the "reads in my app" to the "writes" but I know I do reads
for initialization every time, and reads for data every time. I only do
writes on some requests... So I am going to be conservative and say that I
do 3x as many reads as writes in my code, but so far today I have hit the
Datastore with a write 10x as many times as I have a read. That works out
to my local memory and memcache saving me 97% of the time.
I don't have an easy way to tell you how much of the time that is instance
memory and how many times it is memcache, but I assure you it works.
Hi.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengi...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.
If you are reading 6500 rows every request you are doing something wrong. Why would you possibly need that much data?
They never change then.
Put the array hard coded in to your code.
$MyCities = array(‘Dehli’,’New York’,’Austing’);
Fine that is php code and only one of those is in India… But you get the idea. No reason to use data store for that.
Yes. Putting them hard coded values is the last solution but it is tough to make array of 6500 hard coded values.
Huh?
Way 1:
Put the list in a CSV
String = “Text of CSV”
Explode(String)
Way 2:
Read Data from data Store
Serialize Data
Echo/Print Serialized Data
Copy/Paste Serialized data in to code
Way 3:
Copy data from data viewer in to excel
Export to CSV
Use find and replace to replace New line with New line “ and , with “,”
Put a curly at the beginning and end, and paste in to your code.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of Deepak Singh
Sent: Monday, November 21, 2011 12:40 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Memcache doesn't work
Yes. Putting them hard coded values is the last solution but it is tough to make array of 6500 hard coded values.
@Simon,
How do i store them as serialised data in datastore ?
Regards
Deepak
On Tue, Nov 22, 2011 at 1:38 AM, Simon Knott <knott...@gmail.com> wrote:
Ha. Yes, Brandon's idea is better. Need caffeine...
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/6rqyUnPbxIAJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
--
Deepak Singh
Ha. Yes, Brandon's idea is better. Need caffeine...
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/6rqyUnPbxIAJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
2. Now, I very much doubt that your users click/browse/view more than
a dozen cities during their visit. I cannot come up with any use case
why you need to load all 6,500 names for each visitor. Users will
never look at more than 50 records. If you need to load/display more
than 50 city names at a time, you have the wrong data model or bad app
design.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
What persistence framework are you using?
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/Dcm2VWTxzfEJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Just annotate it as @Serialized
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/X7FiDN1gWMkJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.