What is the difference between static pages and Memcached?

Source: Internet
Author: User
What is the difference between static pages and Memcached? Sorry, I don't know much about php. I do java, because Memcached also exists in java. I still have some knowledge about Memcached in java. Our company is working on a mobile phone application, and PHP is used on the server side. However, PHP users use static pages to improve efficiency, but the problem arises, he threw all the logic functions to the mobile phone end, mainly because I processed a lot of services on the mobile phone end, and I created more than 20 data tables on the mobile phone end, as a mobile phone developer, such stability must be relatively poor. I proposed that he use Memcached to share some business logic. I don't understand static pages. can you tell me the difference between static pages and Memcached? What are the advantages and disadvantages? I can propose to the manager.


Reply to discussion (solution)

Persistent comparison
Static pages are stored in the hard disk, and memcached content is stored in the memory.
Static page, the server is shut down or restarted, and the content will not disappear.
Because memcached is stored in the memory, the restart will disappear.

Scalability comparison
Static pages can only be read from the local machine. if you want to read all servers, you need to generate this static page on each server.
Memcached can share read and write data on multiple hosts.

Usage comparison
For example, the content of a page is Hello world.
When using a static page, the generated 1.html content is also Hello World.
By using memcached, the content of the Hello World page is stored in memcached. During access, it is read from memcached.

In addition, static pages and memcached are used to reduce the pressure on the database. Therefore, the contents of the two do not need to be persistent.
Persistent data should be performed at the database level.

If you only have one server, we recommend that you use static pages because memcached requires network overhead.
Memcached is recommended for multi-host environments.

There are two concepts. basically, although there are similarities, there are actually differences. I don't know what the problem is. you just have a front-end as a mobile phone, and PHP is used to process data. This must be clearly divided. What else does PHP do and data management. Data result output and data management.
Do not worry too much about other front-end jobs. you must clarify this with your manager. what do you mean by dropping a bunch of things in your cell phone?

Thank you, two enthusiastic Daniel. after listening to your explanation, I have a concept in my mind...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.