Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 533731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:32:19+00:00 2026-05-13T09:32:19+00:00

I have a PHP application that calls web services APIs to get some objects

  • 0

I have a PHP application that calls web services APIs to get some objects before rendering a web page that incorporates those objects. In some cases these APIs are really slow (seconds) and that is not acceptable from a user experience point of view. Two things I know I can do…

  1. Use ajax and make these calls in the background
  2. Time out the call and degrade gracefully if it is taking too long

Neither is ideal, so I was thinking about using memcache (the PHP extension for memcached) to cache the object that I get from the 3rd party web service. The objects will be loaded many times by different users loading the same page, so this seems to make sense.

The objects are relatively small (~1k).

Does this sound like a reasonable approach? I know memcached was originally designed to alleviate database load, so I’m wondering whether there is a gotcha somewhere that I’m not seeing.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:32:20+00:00Added an answer on May 13, 2026 at 9:32 am

    This is a perfectly legitimate use of memcache. It is not only for database load reduction, it is for caching and object storage in general. 🙂

    Also note, PHP has two interfaces for memcached. Confusingly, they are named “memcache” and “memcached“. Read these to pick between the two:

    • https://serverfault.com/questions/63383/memcache-vs-memcached
    • http://code.google.com/p/memcached/wiki/PHPClientComparison
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 316k
  • Answers 316k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In SQL Server 2005 and beyond: SELECT t.Id, t.Thread, t.Post… May 13, 2026 at 11:26 pm
  • Editorial Team
    Editorial Team added an answer The lifetime for a reference begins after it's initialized (like… May 13, 2026 at 11:26 pm
  • Editorial Team
    Editorial Team added an answer #include <linux/vmalloc.h> #include <asm/pgtype_types.h> ... char *p = __vmalloc(byte_size, GFP_KERNEL,… May 13, 2026 at 11:26 pm

Related Questions

I'm trying to implement a stateful web service in PHP using the SOAP extension.
I have a Windows Service which performs a certain function, and then needs to
I am planning on putting up a web service, or some other service exposed
I've run across an interesting PHP/SOAP error that has me stymied. After searching I
My company publishes a set of .NET webservices available via SOAP. I need to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.