Below are few latest Interview Questions On Memcached
Q1. What is Memcached?
Ans. Memcached is an open-source, high-performance, distributed memory object that speeds-up data-driven websites by caching data and objects in RAM. It is an element that helps in storing data for 1 /6/12 hours or 1 day etc. it lets you integrate with your applications to procure increased performances.
Q2. What is the language of Memcached and who is the author?
Ans. Memcached is written in C language and the author of the same is Danga Interactive.
Q.3. How do Memcached works?
Ans. Memcached works in simultaneous ways:
- Gets the details of the user, browser by sending the request to an application
- Application calls for the Memcached for a particular user
- If Result is found in Memcached, Return the result from Memcached
- If no Result is found in Not Memcached, the Application send the request to the database and saves the same in Memcached.
- Each Memcached have one unique key
- On the behalf of the key Get/Set the data works
- Allows you to delete one or more keys
- Allows you to assign tags to one or more keys
Q4. What is the best use of Memcached?
Ans. The best uses of Memcached are:
- Easy to install in Windows and Unix operating system
- All the major languages like Java, PHP, C/C++, Python, Ruby, Perl etc are provided by Memcached for API integration
- Enhances the performance of web application by caching
- Reduced the burden of a database server
- Aids to delete one of more vales
- Aids to update the values of keys
Q5. In what conditions cache cannot retain the stored information?
Ans. In the following conditions, a cache cannot retain stored information:
When memory gets allocated for the cache is exhausted
- When an item from cache gets deleted
- When an individual item in the cache gets expired
Q6. Which fields of websites and services are favorable for the usage of Memcached?
Ans. Memcached can be used for :
- All social networking sites for profile caching
- Content aggregation i.e. HTML/Page caching
- E-commerce websites for HTML and Session caching
- Location-based services for database query scaling
- Gaming and entertainment services for session caching
- Used for tracking cookies/ profile for ad targeting
Q.7. What are the demerits of Memcached?
Ans. The limitations of Memcached are:
- Cannot store data patiently and permanently
- It is not a database
- Cannot cache large objects
- It is not an application specific
- It is not fault-tolerant or highly available
- 8. When was the initial version of Memcached first launched?
The initial version of Memcached is launched on May 22, 2003.
Q.9. Is there a possibility to share a single instance of Memcache between multiple projects?
Ans. Yes, because Memcache is a memory that stores space and it can be run on one or more servers. It also allows you to run two different Memcache processes on the same hosts even though they are independent.
- 10. What happens to the data stored in Memcached when a server is automatically shut down?
Ans. When the data stored in Memcached and the server gets shut down accidentally, the data is already not permanently stored. It is not a prolong data, whatever happens, the data gets deleted in Memcached.