1. 02 Jul, 2018 4 commits
    • totten's avatar
      (#174) Forms/Sessions - Clear in roughly the same ways as before · 0a12cd4a
      totten authored
      In the past, if one clears the `civicrm_cache` table (i.e.  by calling
      `CRM_Core_Config::clearDBCache()` ==> `TRUNCATE TABLE civicrm_cache`), then it
      has the effect of destroying any active sessions/forms.
      
      Now, in allowing sessions to be stored elsewhere, we lose that side-effect.
      
      If we want strictly equivalent behavior (from a business-logic perspective),
      then we'd want the patch to go a bit further -- calling
      Civi::cache('session')->clear() at the same time that it does
      `clearDBCache()`.
      
      This revision adds `clear()` calls to various spots discussed here:
      
      * https://docs.google.com/spreadsheets/d/1FxuIvr2noelBvhu5eja9_ps3YUWnkmGhqijBO3gH8Po/edit?usp=sharing
      * https://github.com/civicrm/civicrm-core/pull/12362#issuecomment-400897782
      0a12cd4a
    • totten's avatar
      (#174) Forms/Sessions - Store state via Civi::cache('session') · 19707a63
      totten authored
      Overview
      ----------------------------------------
      
      When using forms based on CiviQuickForm (specifically `CRM_Core_Controller`), `CRM_Core_Session`
      stores form-state via `CRM_Core_BAO_Cache::storeSessionToCache` and `::restoreSessionFromCache`,
      which in turn calls `CRM_Core_BAO_Cache::setItem()` and `::getItem()`.
      
      However, using `CRM_Core_BAO_Cache::setItem()` and `::getItem()` means that all session state
      **must** be written to MySQL.  For #174, we seek the **option** to store via
      Redis/Memcache.
      
      Before
      ----------------------------------------
      
      * (a) Form/session state is always stored via `CRM_Core_BAO_Cache::setItem()` and `civicrm_cache` table.
      * (b) To ensure that old sessions are periodically purged, there is special purpose logic that accesses `civicrm_cache`
        (roughly `delete where group_name=Sessions and  created_date < now()-ttl`).
      * (c) On Memcache/Redis-enabled systems, the cache server functions as an extra tier. The DB provides canonical storage for form/session state.
      
      After
      ----------------------------------------
      
      * (a) Form/session state is stored via `CRM_Utils_CacheInterface`.
          * On a typical server, this defaults to `CRM_Utils_Cache_SqlGroup` and `civicrm_cache` table.
      * (b) To ensure that old sessions are periodically purged, the call to `CRM_Utils_CacheInterface::set()` specifies a TTL.
          * It is the responsibility of the cache driver to handle TTLs. With #12360, TTL's are supported in `ArrayCache`, `SqlGroup`, and `Redis`.
      * (c) On Memcache/Redis-enabled systems, the cache server provides canonical storage for form/session state.
      19707a63
    • eileen's avatar
      Merge pull request #12379 from totten/master-psr16-sqlgroup · 3962e60c
      eileen authored
      (#174) Full PSR-16 compliance for SqlGroup
      3962e60c
    • eileen's avatar
      Merge pull request #12386 from mattwire/IPN_NFC · 6936f141
      eileen authored
      NFC code cleanup for AuthNet, Paypal, PaypalPro IPNs
      6936f141
  2. 01 Jul, 2018 9 commits
  3. 30 Jun, 2018 9 commits
  4. 29 Jun, 2018 9 commits
  5. 28 Jun, 2018 2 commits
  6. 27 Jun, 2018 7 commits