| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2021-06-22 12:26 UTC] cmb@php.net
 
-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: cmb
  [2021-06-22 12:26 UTC] cmb@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 09:00:01 2025 UTC | 
Description: ------------ Apc/u is (obviously) a good and fast way of sharing data between aplications (as intended), but sometimes you may need NOT to do it, at least not in the 'normal way'... I often manage several websites in a dev enviroment, and the 'worst' thing one could do is to store sensible data like sessions, user data, etc... (without a Prefix) to avoid extra connections to the database... apc_store('user_{id}', [session_data => ..., etc => ...]) Then all the dev websites will share the exact same info/data for the user_{id} Of course I have a wrapper class that prefix everything but I think will be very very usefull to have it implemented in the core and because C is faster... A simple function that set the prefix for the session, for instance... apcu_prefix(string $prefix = null) And calling the function without argument can return the current prefix or maybe just reset it to default... Can also be a very important feature from a security POV since I have seen some very bad configured shared hosts having this problem, and one could read the info that other hosts had stored... The prefix can also act like a password... for functions like apcu_cache_info Only if you know the prefix/password you will be able to get the info Thank you