From a5d554ca261f429e0dd2ab45c570c9522df029d5 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 29 Dec 2015 17:55:22 +0100 Subject: [PATCH] Init new chapters --- caching,_sessions,_local_storage_&_cookies.md | 57 +++++++++++++++++++ datamapper_&_query_builder.md | 4 ++ modules.md | 21 +++++++ 3 files changed, 82 insertions(+) create mode 100644 caching,_sessions,_local_storage_&_cookies.md create mode 100644 datamapper_&_query_builder.md create mode 100644 modules.md diff --git a/caching,_sessions,_local_storage_&_cookies.md b/caching,_sessions,_local_storage_&_cookies.md new file mode 100644 index 0000000..5876ca8 --- /dev/null +++ b/caching,_sessions,_local_storage_&_cookies.md @@ -0,0 +1,57 @@ +# Caching, Sessions, Local Storage & Cookies + +## Caching + +For caching the `CacheManager` provides access to the caching systems in place. +Out of the box the CacheManager supports and automatically initializes either +Redis or Memcached depending on the client configuration. The caching is +not mandatory and therfor shouldn't be missuesed as in-memory database. It is +not necessary to check if Redis or Memcached are available the CacheManager +automatically handles the caching based on their existence. + +### HTTP Cache + +By default only stylesheets, javascript and layout images as well as module +images are cached. Everything else is considered volatile and not cached. +If a response specific response should be cached feel free to use the +response header: + +Example usage for 30 days caching: + +``` +$resposne->setHeader('Cache-Control', 'Cache-Control: max-age=2592000'); +``` + +In order to trigger a re-cache of stylesheets or javascript files make sure to +include their version hash as file name. This way version updates will result +in a new file name and will be re-cached by the client browser. + +Example usage: + +``` +$head->addAsset(AssetType::JS, $request->getUri()->getBase() . 'Modules/Media/ModuleMedia_' . self::$version . '.js'); +``` + +## Sessions + +Sessions are handled via the `SessionManager`. Sessions can be set and +manipulated from the web application as well as the socket or console +application. + +### HTTP + +The Http session will be saved automatically, there is no need to access the +super global `$_SESSION`. Make sure to only modify session data using the +SessionManager + +### Socket & Console + +The session will be stored and assoziated with the logged in user in memory. +A disconnect or quit is considered as a logout and therefor results in the +destruction of the session object of this user and will be empty for the +next login. + +## Local Storage + + +## Cookies \ No newline at end of file diff --git a/datamapper_&_query_builder.md b/datamapper_&_query_builder.md new file mode 100644 index 0000000..77d8789 --- /dev/null +++ b/datamapper_&_query_builder.md @@ -0,0 +1,4 @@ +# DataMapper & Query Builder + + + diff --git a/modules.md b/modules.md new file mode 100644 index 0000000..4a2021d --- /dev/null +++ b/modules.md @@ -0,0 +1,21 @@ +# Modules + +## Info + +## Install + +## Update + +## Uninstall + +## Routing + +## Model, View, Controller, Template + +## Resources + +## Providing + +## Requesting + +## Receiving \ No newline at end of file