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

  • Home
  • SEARCH
  • 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 3600666
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:31:27+00:00 2026-05-18T20:31:27+00:00

I am developing a social network from scratch and need to store the user’s

  • 0

I am developing a social network from scratch and need to store the
user’s frequently required data like his friendlist, groups, news-feed
post Ids, so that it can be accessed fast after each refresh rather
than querying the database each time it is asked. What would be a
better way to store this data?
The application is expected to bear heavy traffic.

I was thinking of storing this data in php objects after the user
login. I am using PHP OOPs model to interact with the database thus my
data is retrieved though objects & retrieved data is stored in objects
after query from database. So, Instead of destroying the object as
soon as its value has been passed once, I would retain the required
objects uptil the user is logged in.
Is this the correct way?

I am just a newbie..

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-05-18T20:31:28+00:00Added an answer on May 18, 2026 at 8:31 pm

    Storing in a session… the whole data stored in session is loaded at script status. To sum it up:

    1. Only the original session owner will be able to access data
    2. All session data is loaded before the script initialized. It’ll be loaded every time user will change a page or issue AJAX call. I think not really “fast” thing.

    Develop yourself simple caching class:

    • $cache = new xcache($obj_name, $expire);
    • get() -> gets object value -> false if not-found / expired
    • set($value) -> sets object value -> (serialize it / you can do gzip compress here it’s very fast)

    Then use those layout to write caching mechanism using: memcache / myisam table / apc / mongodb, etc. On everything beside files you can implement an ACID cache. The important thing is not choosing what you’ll use now, but implement something that’ll allow you to easily change it later 🙂

    I don’t know if you need groups within your cache… if you do it’ll limit the technologies you can use (eg. to clean all caching data for specific user after updating one of his DB tables). Another good thing is to assign table name to each cache item, everything could be updated very easy then.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a social network from scratch and need to store the user's
I'm currently developing a php daemon for connecting and retreiving data from social networks
I'm in the process of developing a social network site. And been thinking of
I've been evaluating technology stack for developing a social network based application. Below are
I'm developing a social network using Microsoft Technologies. I want to make a Wall
I'm developing my own social network, and I haven't found on the web examples
I am developing a balloon notification for my social network. I came across this
we're developing one service to be integrated with various social networks and would like
In the application i am developing I need to get information from varoius sources
Is there a Java library that provides functionality for developing social network applications such

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.