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.

 

 

From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Deepak Singh
Sent: Monday, November 21, 2011 11:50 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Memcache doesn't work

 

The reason for reading is, they are the city names in INDIA and i need to
display all the city names for each client. 

each entity has only two properties -cityname, cityid - but there are 6500
entities.

 

i am not able to find any solution for this situation.

 

What i am planning to do is,

 

Read them once and put in an Arraylist object and share this object
everywhere. But how can i create one such arraylist object which lives
forever and can be shared across all instances.

 

Pls suggest.

 

Thanks

Deepak

 

 

On Tue, Nov 22, 2011 at 1:09 AM, Brandon Wirtz <drak...@digerat.com> wrote:

If you are reading 6500 rows every request you are doing something wrong.
Why would you possibly need that much data?

 

From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Deepak Singh
Sent: Monday, November 21, 2011 6:59 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Memcache doesn't work

 

My application while on loading makes a read operation around 6500 rows
which is fixed for app. I have set memcache for this feature with cache
expiration to 8 days. Bu i observe that cache usually fails 5 to 6 times in
day, so in that case my app has datastore read of around 6500 rows. Thus my
app heavily uses datastore read quota whic is very costly to me.

 

I have been unable to make cache available for 8 days or even working
properly.

 

It would be great if you can let me know how to optmize this cache properly.

 

Thanks

Deepak

On Mon, Nov 21, 2011 at 4:14 AM, Brandon Wirtz <drak...@digerat.com> wrote:

Memcache is just a cache. Your values have no guarantee of being there even
1micro second after you did the write.

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.



-----Original Message-----
From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Jamil Rzayev
Sent: Sunday, November 20, 2011 1:48 PM
To: Google App Engine
Subject: [google-appengine] Memcache doesn't work


Hi.

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...

--
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com
<mailto:google-appengine%2bunsubscr...@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.


--
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com
<mailto:google-appengine%2bunsubscr...@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.





 

-- 
Deepak Singh

-- 
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

-- 
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com
<mailto:google-appengine%2bunsubscr...@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.





 

-- 
Deepak Singh

-- 
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

-- 
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to