Hi Everyone! Moodle is an open source CMS that is widely used to create online learning media. You can create online classes, online courses or online tests using Moodle. Due to the large amount of resources required on the server, the use of Moodle on Hosting is limited. Installing Moodle on Hosting can only be done on a Business Hosting Package and its maximum users are only 30 people. Now one thing that makes Moodle's performance heavy is the possibility that the website cache is not properly managed. For that, you must enable Memcached on Moodle. What is Memcached for on Moodle? How do I set up Memcached in Moodle? Come on, follow the following guidelines.

Memcached on Moodle: For Better Cache Management

What is Memcached for? Memcached stands for Memory Object Caching System . One technology to speed up dynamic web applications is by storing and distributing data into server memory (RAM) so that the database load becomes light and website loading is faster.
Before following the step by step how to set up Memcached in Moodle, you have to enable Memcached first. How to? Please login to cPanel Hosting then look for the "Memcached" menu. By default, Memcached is active. Make sure Memcached looks like the following image. If not yet active, please click Start.

Also Read: Complete Guide to Activating Memcached on Hosting

How to Set Memcached in Moodle

Moodle already has a Memcached plugin that can be used. Here's step by step how to set up Memcached in Moodle,

1. Memcached Must Be Active

The first step you have to do is make sure Memcached is active. And please take note of the memcached.sock file path / directory. In addition, make sure you are using PHP version 7.4. To change PHP version in cPanel, please follow the Guide on How to Change PHP Version in cPanel .

 

2. Login Moodle

Please open a Moodle-based online class and enter your username and password. Then click Log in.

Like WordPress, Moodle also has plugins with each function. Please click Dashboardthen select Site administrationand click Plugins.

Then in the section Caching, please click Memcached.

 

4. Enter the memcached.sock directory

In the first step, when enabling Memcached, you will find the memcached.sock directory. For example: /home/websites/memcached.sock. Now in this section you have to write down the memcached.sock file directory as follows:/home/websites/memcached.sock:0

 

Then click Save Changes. If you are successful in saving the path / directory of memcached.sock, the following image will appear.

Note: The memcached.sock directory on each hosting is different, please adjust it!

5. Configure Memcached in Moodle

Then it's time to configure Memcached. Click Menu Cachingand select Configuration.

In the section Memcachedplease click Add instance.

Then fill in the form that appears. Please customize it with the memcached.sock directory on your Hosting.

Store name: please fill in memcached_store
Locking: leave the default
Servers: / home / websites / memcached.sock: 0 (adjust to the 4th step)
Use compression: Yes
Use serializer: leave the default only
Prefix key: memcache_

Then click Save Changes. If successful, the following display will appear.

6. Perform a Memcached Performance Test on Moodle

Please click Cachingand click Test performance.

Try checking the Memcached section. If it's already running, it means that Memcached is successfully active on Moodle.

7. Check Moodle Loading Time

You can also check the loading times for online classes based on Moodle. How fast is it when it is accessed? How is the performance of the database? and so on using the https://moodle.org/plugins/report_benchmark plugin . Then the benchmark results will appear from your Moodle.

Conclusion

Memcached is one of the Open Source software which is effective in cache management. Especially in using Moodle on Hosting. Cache management is very important. But keep in mind that the use of Moodle on Hosting is very limited. If an online class / online test based on Moodle interferes with other hosting users, we will take action. To be more secure, you can install Moodle on a VPS . The way Memcached settings on Moodle VPS is almost the same as the settings on Hosting.

What is Safelink Asia?

Safelink.asia is a completely free tool where you can create short links. URL security with cryptographic algorithm. Protect your web visitors with a secure link, to avoid viruses, malware, thief, etc. Apart from being free, you get paid! Register now!


Shorten URLs & earn money

So, now you can make money from home, when managing and protecting your links with Safelink Asia. Signup for an account in just 1 minutes. Once you've completed your registration just start creating short URLs and sharing the links with your family and friends. See our proof of payment and publisher rate.


Our partners and network

Here are some of our partners and networks that have collaborated on advertising: 401XD Group, MC Project, Kincai Media, Kartu Nama Digital, SEO Secret Indonesia, Safelink Asia, Media Bisnis, Blackexpo, Adigunawan.net.