title: The way to reduce Cached Memory by structures in c++
body: <p>I've been using some structures to cache some temporary list.
  And, I'd like to find some solutions to reduce allocated memory as maintaining the performance.
  Structure's components are below.</p>
  
  <pre><code>structure LatestInfo
  {
          std::string visitedWebsites;
          std::string watchedVideo;
          std::string userId;
          std::string userName;
          unsigned int lastLoginTime;
          std::string contentsRating;
          //and so on
  }
  </code></pre>
  
  <p>And I have <code>std::vector&lt;LatestInfo&gt; latestList</code> to store <code>LatestInfo</code> structure.</p>
  
  <p>There are many <code>LastestInfo</code> in <code>latestList</code> and it is getting bigger.</p>
  
  <p>So, it allocate a lot of memory (more than 200Mbs) in our system.</p>
  
  <p>Not only <code>LatestInfo</code>is updated regularly(every 2 hours), but also the performance is very important, we're storing some fixed value in DB(SQLite) only.</p>
  
  <p>So, I'd like to reduce its allocated memory without using a DB.</p>
  
  <p>IMO, if std::string can be compressed, it would be good and require minimum changes.
  Do you know some open sources or libraries to compress it to reduce allocated memory?</p>
  
  <p>or better solutions you have?</p>
  
  <p>Thank you.</p>