Memcache maximum duration

After spending few hours on memcache / php, i come to know that you can cache an object in memcache for atmost 30 days. (sadly)
This may be because of INT limit of PHP.

May be it will help someone.


4 Responses to “Memcache maximum duration”

  1. Kashif Says:

    30 days are enough , wana more ?

    • azghanvi Says:

      Yes, there are places where our database table is almost static, we never add/modify in it.
      It’s best to cache it for more time to avoid db hit.

  2. Talal Bin Ghizal Says:

    Nops, buddy it isn’t PHP’s fault …

    any expiry time bigger than 30 day will be treated as Unix Time Stamp which is actually a big number that contains number of seconds elapsed from 1st Jan 1970. And that number would certainly have been crossed already.

    So, memcached may save that object for more than 30 days but its fate is unstable if its expiry time is deliberately set for more than 30 days …

Share your thoughts & feedback

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: