Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 11. Sessions and Data Persistenc... > Storing Arbitrary Data in Shared Mem...

Recipe 11.6. Storing Arbitrary Data in Shared Memory

11.6.1. Problem

You want a chunk of data to be available to all web server processes through shared memory.

11.6.2. Solution

Use the pc_Shm class shown in Example 11-2. For example, to store a string in shared memory, used the pc_Shm::save(  ) method, which accepts a key/value pair:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial