{"id":16246,"date":"2011-12-31T09:56:52","date_gmt":"2011-12-31T09:56:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/dpwpsimplecache\/"},"modified":"2012-01-02T19:41:51","modified_gmt":"2012-01-02T19:41:51","slug":"dpwpsimplecache","status":"publish","type":"plugin","link":"https:\/\/hi.wordpress.org\/plugins\/dpwpsimplecache\/","author":8748405,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.4","stable_tag":"0.4","tested":"3.3.2","requires":"2.5","requires_php":"","requires_plugins":null,"header_name":"DP Simple Cache","header_author":"Danilo Paissan","header_description":"","assets_banners_color":"","last_updated":"2012-01-02 19:41:51","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/danilopaissan.net\/blog\/","header_plugin_uri":"https:\/\/github.com\/danpai\/dpwpsimplecache","header_author_uri":"http:\/\/danilopaissan.net","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1387,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1":{"tag":"0.1","author":"danpai","date":"2012-01-02 00:07:21"},"0.2":{"tag":"0.2","author":"danpai","date":"2012-01-02 00:07:21"},"0.3":{"tag":"0.3","author":"danpai","date":"2012-01-02 00:28:44"},"0.3.1":{"tag":"0.3.1","author":"danpai","date":"2012-01-02 09:51:22"},"0.3.2":{"tag":"0.3.2","author":"danpai","date":"2012-01-02 10:38:30"},"0.4":{"tag":"0.4","author":"danpai","date":"2012-01-02 19:41:51"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.3","0.3.1","0.3.2","0.4"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[146,14950],"plugin_category":[52],"plugin_contributors":[221315],"plugin_business_model":[],"class_list":["post-16246","plugin","type-plugin","status-publish","hentry","plugin_tags-cache","plugin_tags-session","plugin_category-performance","plugin_contributors-danpai","plugin_committers-danpai"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/dpwpsimplecache.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>D(ifferent)P(lace) Simple Cache is a WordPress plugin to implement a simple cache of objects at session level.<\/p>\n\n<p>dpwpsimplecache provides a global variable $dpcache, which is an instantiation of the class DP_Cache already set up to talk to the $_SESSION. Always use the global $dpcache variable (Remember to globalize $dpcache before using it in any custom functions).<\/p>\n\n<p>If you don't want to track sessions into db set the $USE_DB_SESSION_MANAGER global variable to 0<\/p>\n\n<pre><code>    global $USE_DB_SESSION_MANAGER;\n    $USE_DB_SESSION_MANAGER = 0; \/\/ default 1\n<\/code><\/pre>\n\n<p>Insert object;<\/p>\n\n<pre><code>    $dpcache-&gt;set($key,$object);\n<\/code><\/pre>\n\n<p>Get object:<\/p>\n\n<pre><code>    $object = $dpcache-&gt;set($key);\n<\/code><\/pre>\n\n<p>Count active users:<\/p>\n\n<pre><code>    $count_users = $dpcache-&gt;get_sessions_number();\n<\/code><\/pre>\n\n<p>Count objects in the current user's $_SESSION:<\/p>\n\n<pre><code>    $dpcache-&gt;get_statistics();\n<\/code><\/pre>\n\n<p>Get all objects in the current user's $_SESSION:<\/p>\n\n<pre><code>    $dpcache-&gt;get_all_values();\n<\/code><\/pre>\n\n<p>Test if an object exist in the current user's $_SESSION:<\/p>\n\n<pre><code>    $dpcache-&gt;contais($key);\n<\/code><\/pre>\n\n<p>Delete all objects. If the $all parameter is set to false the method delete only the current user's $_SESSION, if true truncate the entire table (default false):<\/p>\n\n<pre><code>    $dpcache-&gt;flush();\n<\/code><\/pre>\n\n<p>Prints human-readable information about all objects:<\/p>\n\n<pre><code>    $dpcache-&gt;inspect();\n<\/code><\/pre>\n\n<p>Delete an object in the current user's $_SESSION:<\/p>\n\n<pre><code>    $dpcache-&gt;delete($key);\n<\/code><\/pre>\n\n<p>Delete single session by ID:<\/p>\n\n<pre><code>    $dpcache-&gt;invalidate_single_session($sessid);\n<\/code><\/pre>\n\n<p>Prints the number of active sessions:<\/p>\n\n<pre><code>    &lt;?php echo dpscache_active_users(); ?&gt;\n<\/code><\/pre>\n\n<p>At any time, through the administrative page, you can:<\/p>\n\n<ul>\n<li>see all objects in the current user cache<\/li>\n<li>delete all objects in the current user cache<\/li>\n<li>force the deletion of all sessions<\/li>\n<li>force the deletion of a single session<\/li>\n<\/ul>\n\n<p>You can find the latest release on <a href=\"https:\/\/github.com\/danpai\/dpwpsimplecache\">GitHub<\/a><\/p>\n\n<!--section=installation-->\n<p>Copy the folder dpwpsimplecache and its content into <code>your-blog\/wp-content\/plugins<\/code><\/p>\n\n<!--section=faq-->\n<p>No FAQ at this time.<\/p>\n\n<!--section=changelog-->\n<h4>0.1<\/h4>\n\n<ul>\n<li>This version is quite stable but it can be used as long as you know what you are doing.<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>This version add a custom table for session management. It can be used as long as you know what you are doing.<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>Fixed some minor errors<\/li>\n<\/ul>\n\n<h4>0.3.1<\/h4>\n\n<ul>\n<li>Fixed some minor errors<\/li>\n<\/ul>\n\n<h4>0.3.2<\/h4>\n\n<ul>\n<li>Fixed some minor errors<\/li>\n<\/ul>\n\n<h4>0.4<\/h4>\n\n<ul>\n<li>Single session level management<\/li>\n<\/ul>","raw_excerpt":"D(ifferent)P(lace) Simple Cache is a WordPress plugin to implement a simple cache of objects at session level.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/16246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=16246"}],"author":[{"embeddable":true,"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/danpai"}],"wp:attachment":[{"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=16246"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=16246"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=16246"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=16246"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=16246"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=16246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}