XPressME Integration Kit

Trac

source: trunk/include/xoops_block_cache.php @ 36

Last change on this file since 36 was 36, checked in by toemon, 15 years ago

ブロックのXMLキャッシュ化 #43

File size: 519 bytes
Line 
1<?php
2        require_once dirname( __FILE__ ) .'/xml.php' ;
3        require_once dirname( __FILE__ ) .'/xpress_cache.php' ;
4       
5        function xpress_block_cache_write($mydirname,$block_name,$block)
6        {
7                        $xml = XML_serialize($block);
8                        $xml_name = $block_name . '.xml';
9                        xpress_cache_write($mydirname,$xml_name,$xml);
10        }
11        function xpress_block_cache_read($mydirname,$block_name)
12        {
13                        $xml_name = $block_name . '.xml';
14                        $xml_data = xpress_cache_read($mydirname,$xml_name);
15                        return @XML_unserialize($xml_data);
16        }
17?>
Note: See TracBrowser for help on using the repository browser.