Daftar Isi
What is Memcached?
Memcached is a technology used as a system for storing and distributing data in server memory (RAM). Detik.com is an example of a website using Memcached. The very fast search engine is coded with memcached. The working of memcached is very simple because its function is only to cache the server and reduce the load on the database server and the data stored by memcached is stored in memory so that accessing the data is much faster than accessing the database server.
Install Memcached on Ubuntu
Update package
Then install Memcached and associated packages
$ sudo apt-get install memcached
Setting up Memcached installation
Use the following command to display information about the memcached command:
The default configuration file can be found at:
$ vi /etc/memcached.conf
On startup, Memcached will start on port 11211 by default according to the default configuration file. To change the port, simply change the number in the configuration file. If you want to run Memcached on the port 1337with memory 4GBand allows a maximum 2,000 connection, change it to the following code:
-p 1337
-m 4096
-c 2000
Exit and save the configuration file, then restart Memcached
$ sudo service memcached restart
Implementation of MMR
Start from scratch and create a new project
$ rails new memcached_coba -d postgresql
$ cd memcached_coba
$ rails g scaffold post title:string description:text
$ rake db:create
$ rake db:migrate
Start configuring Memcache
Add the ‘dalli’ gem to the Gemfile and then do the bulk install
Edit file config/environments/development.rb add or modify:
config.cache_store = :dalli_store
Create a file ‘memcached.rb‘ on file config/initializers/memcached.rb contents of the file as follows:
CACHE = Dalli::Client.new('127.0.0.1', { :namespace => 'memcached_coba', :expires_in => 3600, :socket_timeout => 3, :compress => true })
Basics of using Memcached
# Memcached backup
CACHE.set(key, value)
# Set timeout
CACHE.set(key, value, time_expire)
# Using Memcached
CACHE.get(key, value)
# Remove Memcached
CACHE.delete(key)
# Delete all memcached
CACHE.flush_all
The following is a screenshot of the results of my experiments in the Rails console:
Next, we will try to save the post data using Memcached
Before using Memcached, publish the data first
Let’s look at the server logs Before Using Memcached and the following screenshot

Image Before using Memcached
Now we install Memcached in the posts details
Ubah code method set_post pada file app/controllers/posts_controller.rb
def set_post
@post = CACHE.get("post-#{params[:id]}")
if @post.nil?
@post = Post.find(params[:id])
CACHE.set("post-#{params[:id]}", @post)
end
end
Let’s look at the server logsAfter Using Memcached and the following screenshot

Image after using Memcached
From the above two images we can see the difference when using them memcached when you navigate to the post details page for the second time, the server does not load the database, as evidenced by the absence of the “load info” linePost Load (2.4 ms) SELECT “posts”.* FROM “posts” ‘
Using Memcached can make our website faster. That’s it for this article, if anyone has any questions or something is missing please comment below.
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.
