Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8895891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:54:04+00:00 2026-06-14T23:54:04+00:00

I know this is a weird question but I have 2 servers, one a

  • 0

I know this is a weird question but I have 2 servers, one a vps and another, a mysql host. Now my issue is that I want to try and lower the load on the vps as it is a startup 128mb vps.

Slight problem, what would be required to make the MySQL server work as if it were a cache, I have no access to anything on the MySQL server save the databases im given.

Will this require a separate database? please tell me so if it is possible i can ask my host to add another database.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:54:05+00:00Added an answer on June 14, 2026 at 11:54 pm

    If you host a website on the VPS that uses MySQL as the database, a typical request goes like this:

    • the client makes a request to the web server running on your VPS
    • your script running inside the web server makes a database query
    • the database returns the query results
    • your script formats and prints the results
    • the results appear in the browser (client)

    There is no way to make a request hit the database without going through the web server first.

    If you want to lighten the load on the VPS you can make your script run faster. The most time-consuming part of most web applications is making database queries and waiting for the results. You can, in a lot of cases, avoid that by caching the results of your database queries on the VPS using an in-memory cache like memcached. Be careful with the memory settings though – be sure to set the maximum allocated memory to a sufficiently low setting because your server has very little memory.

    Here is a basic example of caching the result of a SELECT query:

    $cache = new Memcached();
    $cache->addServer('localhost', 11211);
    
    $article_key = "article[$article_id]";
    $article = $cache->get($article_key);
    
    if ($article === FALSE) {
        $statement = $conn->prepare("SELECT * FROM articles WHERE id = :id");
        $statement->exec(array('id' => $article_id));
        $result = $statement->fetchAll(PDO::FETCH_ASSOC);
        if (count($result) === 0) {
            // return a 404 status
        }
        $article = $result[0]; 
        $cache->set($article_key, $article);
    }
    
    // display the article
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i know this question was asked before but i have this very weird beginner
I know this can seem a weird question but for me it would be
I know this is a weird question to ask, but I would like to
I know this one is the weirdest of all weird questions I have asked
I know this is a weird question, but let me explain more. I use
This is a weird requirement I have. I know even my question is quite
I know this may sound like a weird question to ask but I would
I have this weird question. I would like to know if it is possible
i know this seems to be a weird question, and it is! But taking
I know this question is going to be...weird and...odd. I have programmed stuffs for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.