As any system grows in complexity and usage, performance becomes a critical concern. One of the most effective ways to enhance performance and scalability in web applications is through caching. Implementing a robust caching solution in WHMCS could greatly improve speed, efficiency, and user experience.
laura
commented
22nd August
The https://geometrydashlitepc.io game’s difficulty increases as players progress, with each level introducing new challenges and mechanics.
Official Response
WHMCS
commented
13th April 21
We've updated this request to mark it as currently declined. This is not because we disagree with the concept of caching, but before we commit to that, we would like to understand what it is you are hoping to achieve from the introduction of it. Are there areas where you are seeing performance issues currently, and if so, what are those areas and in what ways are they presenting?
Thanks in advance!
WHMCS-addons.eu
commented
14th April 23
Yes, whmcs as a whole is slowing down over time somehow and we've already emptied teh tavbles we feel we can empty (not tickets, for example!). We're actually get complains for the users now how even just logging into the client area, paying an invoice (stripe), pacing an order is all too slow. (and this install I'm referring to runs on a machine with only the 1 website/whmcs install on it and with plenty of Ram and HD).
Serhii
commented
6th July 23
> what it is you are hoping to achieve from the introduction of it
WHMCS does lots of SQL requests at least to tblconfiguration. This area of database is not changed frequently but to my testings it is queried each time WHMCS is launched.
Thus even when someone does dozens of unauthenticated requests per second to the billing website root it causes high CPU usage on server, no matter how powerful it is.
Second thing is official support of using PHP session storage at Redis/memcached - currently WHMCS only claim to support file based storage, but it has much higher overhead comparing to in-memory engines. I have configured my server to store sessions within Redis but there is alert in WHMCS admin panel stating that "System Health is breached, 1 issues Needing Attention". However it is due to that WHMCS is unaware of others than file-based session storages like Redis is.
This is the most obvious area where caching would increase performance a lot. See ticket #LIR-623178 for more details and exact benchmarks I have done.
Eric Caldwell
commented
27th June 20
BTW, we switched to memcached from REDIS. Unless you run a multiserver environment, Memcached is more efficient and faster on single server operations and it comes supported out of the box with WHM/cPanel.
Eric Caldwell
commented
27th June 20
WHM/cPanel does support LSAPI which does support Opcache. We use it.
ramf
commented
28th June 20
Hi @Eric Caldwell
This is the answer I got from WHMCS support when I asked them about enabling opcache caching:
"WHMCS does not support opcache caching. The presence of this extension has been known to cause unexpected behavior with the WHMCS Software, and therefore we recommend disabling it on systems running WHMCS."
Serhii
commented
6th July 23
opcache does not improve WHMCS performance due to inability to correctly co-perform with ioncube - I have tried to achieve that but it required to turn of opcaches' JIT, which makes this kind of caching unusable.
ramf
commented
12th May 20
Hi, What about using opcache caching?
it is the only solution officially supported by PHP developers. The benefits are increased performance and significantly lower memory usage.
However, opcode caching extensions (including OPcache, eAccelerator and APC) aren't compatible with servers configured to use some common types of high-security PHP handlers such as suPHP (the default on WHM / cPanel Linux servers) - I hope there is a way to overcome this problem add add opcache caching support to WHMCS.
Serhii
commented
6th July 23
Opcache does caching of PHP compiled code, but due to ioncube loader it is impossible.
Eric Caldwell
commented
21st April 20
Redis
Rihan Arfan
commented
3rd March 20
Currently, templates are cached to the disk in the templates_c directory. Using Redis would be nice.
Evolve Web Hosting
commented
8th January 20
This is a great idea
Viktor Bajraktar
commented
26th December 18
I agree with @v1ktor. Some parts of the app could be cached as they don't change as often (of course, with an expiry time). If we can control which content should be cached and which shouldn't, that could be a relief for a server for some users. Shopping cart and other data that are loaded in real time should never be cached.
It's not an important feature, but very useful one to have at hand.
Baptiste C
commented
23rd December 18
Could be interesting to integrate with LiteSpeed Cache too :)
v1ktor
commented
23rd December 18
It doesn't matter how big the database is, caching helps reduce the load on the server. This may not seem necessary when you have a bunch of users logged in, and may not matter much when you have server resources to handle more users. But, when you start getting into 1000s of users concurrently using WHMCS and every single page load querying database, you'll start seeing performance issues.
WHMCS is not really dynamic, not many things in WHMCS are updated in real-time or need to be updated every page load. Plus, cache can be invalidated on user action (ex: submitting a form or clicking a button) so data is refreshed. Plus, it should be expired. For example, if your bandwidth graph/data is updated every hour or so, why would you query data from database every page load? That doesn't make sense.
Certain things can be excluded from cache, like shopping cart.
The point is, WHMCS should provide support for object caching so we can use it if needed. WHMCS has an article about high availability that's based on a talk from CEO (i think). Caching and high availability go hand in hand.
myworksdesign
commented
21st December 18
I've been all game for caching until I stepped back and remembered this as well. Like @Johann mentioned, I'm not sure how caching would make sense in WHMCS, because everything is dynamic. It sounds nice, but isn't practical. We also have a 1GB database, and on AWS, everything loads extremely fast. If anything, a focus on database query caching would be nice, but not much needed, as as long as the server/database have the resources, the load is already very fast.
Johann
commented
17th December 18
Our database is 1GB (because of tickets content), and web pages loads within 0.7 sec, i don't see how caching would help in anything in such dynamic CMS
Ahmed Sharaf
commented
15th December 18
There maybe some issues with Memcached if not secured properly given volumetric attacks increased substantially.
But generally speaking, I do vote for the implementation of caching. I would prefer a module approach the enables external service providers such as StackPath.
32 Comments
Login to post a comment.
Thanks in advance!
We're actually get complains for the users now how even just logging into the client area, paying an invoice (stripe), pacing an order is all too slow.
(and this install I'm referring to runs on a machine with only the 1 website/whmcs install on it and with plenty of Ram and HD).
WHMCS does lots of SQL requests at least to tblconfiguration. This area of database is not changed frequently but to my testings it is queried each time WHMCS is launched.
Thus even when someone does dozens of unauthenticated requests per second to the billing website root it causes high CPU usage on server, no matter how powerful it is.
Second thing is official support of using PHP session storage at Redis/memcached - currently WHMCS only claim to support file based storage, but it has much higher overhead comparing to in-memory engines. I have configured my server to store sessions within Redis but there is alert in WHMCS admin panel stating that "System Health is breached, 1 issues Needing Attention". However it is due to that WHMCS is unaware of others than file-based session storages like Redis is.
This is the most obvious area where caching would increase performance a lot. See ticket #LIR-623178 for more details and exact benchmarks I have done.
This is the answer I got from WHMCS support when I asked them about enabling opcache caching:
"WHMCS does not support opcache caching. The presence of this extension has been known to cause unexpected behavior with the WHMCS Software, and therefore we recommend disabling it on systems running WHMCS."
What about using opcache caching?
it is the only solution officially supported by PHP developers. The benefits are increased performance and significantly lower memory usage.
However, opcode caching extensions (including OPcache, eAccelerator and APC) aren't compatible with servers configured to use some common types of high-security PHP handlers such as suPHP (the default on WHM / cPanel Linux servers) - I hope there is a way to overcome this problem add add opcache caching support to WHMCS.
It's not an important feature, but very useful one to have at hand.
WHMCS is not really dynamic, not many things in WHMCS are updated in real-time or need to be updated every page load. Plus, cache can be invalidated on user action (ex: submitting a form or clicking a button) so data is refreshed. Plus, it should be expired. For example, if your bandwidth graph/data is updated every hour or so, why would you query data from database every page load? That doesn't make sense.
Certain things can be excluded from cache, like shopping cart.
The point is, WHMCS should provide support for object caching so we can use it if needed. WHMCS has an article about high availability that's based on a talk from CEO (i think). Caching and high availability go hand in hand.
https://www.wired.com/story/github-ddos-memcached/
But generally speaking, I do vote for the implementation of caching. I would prefer a module approach the enables external service providers such as StackPath.