From 061d1a0b00c08b8bdfe3a414a15f9cc0a1b1f041 Mon Sep 17 00:00:00 2001 From: Eric Rasmussen <erasmussen2@unl.edu> Date: Fri, 8 Oct 2010 16:49:23 +0000 Subject: [PATCH] Add UNL_Cache_Lite to lib --- lib/.pear2registry | Bin 345088 -> 351232 bytes .../UNL_Cache_Lite/0.1.0-info.xml | 72 ++ lib/data/UNL_Cache_Lite/LICENSE | 458 ++++++++++ lib/data/UNL_Cache_Lite/TODO | 46 + lib/docs/UNL_Cache_Lite/docs/examples | 254 ++++++ lib/docs/UNL_Cache_Lite/docs/technical | 28 + lib/downloads/UNL_Cache_Lite-0.1.0.tgz | Bin 0 -> 20511 bytes lib/php/UNL/Cache/Lite.php | 844 ++++++++++++++++++ lib/php/UNL/Cache/Lite/File.php | 91 ++ lib/php/UNL/Cache/Lite/Function.php | 209 +++++ lib/php/UNL/Cache/Lite/NestedOutput.php | 55 ++ lib/php/UNL/Cache/Lite/Output.php | 70 ++ 12 files changed, 2127 insertions(+) create mode 100644 lib/.xmlregistry/packages/pear.unl.edu/UNL_Cache_Lite/0.1.0-info.xml create mode 100644 lib/data/UNL_Cache_Lite/LICENSE create mode 100644 lib/data/UNL_Cache_Lite/TODO create mode 100644 lib/docs/UNL_Cache_Lite/docs/examples create mode 100644 lib/docs/UNL_Cache_Lite/docs/technical create mode 100644 lib/downloads/UNL_Cache_Lite-0.1.0.tgz create mode 100644 lib/php/UNL/Cache/Lite.php create mode 100644 lib/php/UNL/Cache/Lite/File.php create mode 100644 lib/php/UNL/Cache/Lite/Function.php create mode 100644 lib/php/UNL/Cache/Lite/NestedOutput.php create mode 100644 lib/php/UNL/Cache/Lite/Output.php diff --git a/lib/.pear2registry b/lib/.pear2registry index a91563c82a9051144ca7f6c4b13e488bced7b4a3..3346b2f109d006e419fc1e3cc1a10f10d087e9c2 100644 GIT binary patch delta 4385 zcmb_f3vg8B75>jT_l7*lLf8->j}2r4E3ofJHUSa{A-qC@yc7q+&F<YK7?O3fDWKA@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.xml b/lib/.xmlregistry/packages/pear.unl.edu/UNL_Cache_Lite/0.1.0-info.xml new file mode 100644 index 00000000..2b502203 --- /dev/null +++ b/lib/.xmlregistry/packages/pear.unl.edu/UNL_Cache_Lite/0.1.0-info.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> + <name>UNL_Cache_Lite</name> + <channel>pear.unl.edu</channel> + <summary>Basic caching library</summary> + <description>This is a port of the Cache_Lite package from PEAR, with support for PHP 5 and +exceptions. +This package is a little cache system optimized for file containers. It is fast +and safe (because it uses file locking and/or anti-corruption tests).</description> + <lead> + <name>Brett Bieber</name> + <user>saltybeagle</user> + <email>brett.bieber@gmail.com</email> + <active>yes</active> + </lead> + <date>2010-10-08</date> + <time>11:49:16</time> + <version> + <release>0.1.0</release> + <api>0.1.0</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <license uri="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</license> + <notes> +Port of cache lite, remove PEAR dependency, use exceptions instead of PEAR_Error. + </notes> + <contents> + <dir name="/"> + <file baseinstalldir="/" md5sum="ea88bd9816a106e30ac2939a28679fc7" name="UNL/Cache/Lite/Output.php" role="php"/> + <file baseinstalldir="/" md5sum="537413f3d9e949be31a1dd9f42c1dd5c" name="UNL/Cache/Lite/NestedOutput.php" role="php"/> + <file baseinstalldir="/" md5sum="95bccdc3a6ec0d54ab4adf3ce03d4b55" name="UNL/Cache/Lite/Function.php" role="php"/> + <file baseinstalldir="/" md5sum="33a3fc682d63cef8f5cf126637001662" name="UNL/Cache/Lite/File.php" role="php"/> + <file baseinstalldir="/" md5sum="7f02fa5030fe224535a8849aa0d98741" name="UNL/Cache/Lite.php" role="php"/> + <file baseinstalldir="/" md5sum="4c638b951a7c8a4dcb94f10abf1d818b" name="TODO" role="data"/> + <file baseinstalldir="/" md5sum="085e7fb76fb3fa8ba9e9ed0ce95a43f9" name="LICENSE" role="data"/> + <file baseinstalldir="/" md5sum="934071f21c17611811e01396ca604c79" name="docs/technical" role="doc"/> + <file baseinstalldir="/" md5sum="516beafae66ea4b9fd7d29ab9c90845d" name="docs/examples" role="doc"/> + </dir> + </contents> + <dependencies> + <required> + <php> + <min>5.1.2</min> + </php> + <pearinstaller> + <min>1.5.4</min> + </pearinstaller> + </required> + </dependencies> + <phprelease> + <changelog> + <release> + <version> + <release>0.1.0</release> + <api>0.1.0</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <date>2009-10-20</date> + <license uri="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</license> + <notes> +Port of cache lite, remove PEAR dependency, use exceptions instead of PEAR_Error. + </notes> + </release> + </changelog> + </phprelease> +</package> diff --git a/lib/data/UNL_Cache_Lite/LICENSE b/lib/data/UNL_Cache_Lite/LICENSE new file mode 100644 index 00000000..27950e8d --- /dev/null +++ b/lib/data/UNL_Cache_Lite/LICENSE @@ -0,0 +1,458 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/lib/data/UNL_Cache_Lite/TODO b/lib/data/UNL_Cache_Lite/TODO new file mode 100644 index 00000000..e51a0481 --- /dev/null +++ b/lib/data/UNL_Cache_Lite/TODO @@ -0,0 +1,46 @@ + +Patrick O'Lone suggests the following idea which sounds interesting to +add as an optional mode of Cache_Lite class. +(still not tested in the Cache_Lite context) + +------------------------------------------------------------------------- +If you use the flags: + +ignore_user_abort(true); + +$fd = dio_open($szFilename, O_CREATE | O_EXCL | O_TRUNC | O_WRONLY, +0644); +if (is_resource($fd)) { + + dio_fcntl($fd, F_SETLKW, array('type' => F_WRLCK)); + dio_write($fd, $szBuffer); + dio_fcntl($fd, F_SETLK, array('type' => F_UNLCK)); + dio_close($fd); + +} + +ignore_user_abort(false); + +Only the first process will attempt to create a file. Additional +processes will see that a file already exists (at the system level), and +will fail. Another thing to note is that the file descriptor must be +opened using dio_open(), and certain features, like fgets() won't work +with it. If your just doing a raw write, dio_write() should be just +fine. The dio_read() function should be used like: + +$fd = dio_open($szFilename, O_RDONLY|O_NONBLOCK, 0644); +if (is_resource($fd)) { + + dio_fcntl($fd, F_SETLKW, array('type' => F_RDLCK)); + $szBuffer = dio_read($fd, filesize($szFilename)); + dio_fcntl($fd, F_SETLK, array('type' => F_UNLCK)); + dio_close($fd); + +} + +You still use locking to ensure that a write process can finish before +another attempts to read the file. We also set non-blocking mode in read +mode so that multiple readers can access the same resource at the same +time. NOTE: Direct I/O support must be compiled into PHP for these +features to work (--enable-dio). +------------------------------------------------------------------------- diff --git a/lib/docs/UNL_Cache_Lite/docs/examples b/lib/docs/UNL_Cache_Lite/docs/examples new file mode 100644 index 00000000..ab0a2d19 --- /dev/null +++ b/lib/docs/UNL_Cache_Lite/docs/examples @@ -0,0 +1,254 @@ +A few examples of Cache_Lite using : +------------------------------------ + +>>> Basic one : + +<?php + +// Include the package +require_once('Cache/Lite.php'); + +// Set a id for this cache +$id = '123'; + +// Set a few options +$options = array( + 'cacheDir' => '/tmp/', + 'lifeTime' => 3600 +); + +// Create a Cache_Lite object +$Cache_Lite = new Cache_Lite($options); + +// Test if thereis a valide cache for this id +if ($data = $Cache_Lite->get($id)) { + + // Cache hit ! + // Content is in $data + // (...) + +} else { // No valid cache found (you have to make the page) + + // Cache miss ! + // Put in $data datas to put in cache + // (...) + $Cache_Lite->save($data); + +} + +?> + + +>>> Usage with blocks +(You can use Cache_Lite for caching blocks and not the whole page) + +<?php + +require_once('Cache/Lite.php'); + +$options = array( + 'cacheDir' => '/tmp/', + 'lifeTime' => 3600 +); + +// Create a Cache_Lite object +$Cache_Lite = new Cache_Lite($options); + +if ($data = $Cache_Lite->get('block1')) { + echo($data); +} else { + $data = 'Data of the block 1'; + $Cache_Lite->save($data); +} + +echo('<br><br>Non cached line !<br><br>'); + +if ($data = $Cache_Lite->get('block2')) { + echo($data); +} else { + $data = 'Data of the block 2'; + $Cache_Lite->save($data); +} + +?> + + +A few examples of Cache_Lite_Output using : +------------------------------------------- + +>>> Basic one : + +<?php + +require_once('Cache/Lite/Output.php'); + +$options = array( + 'cacheDir' => '/tmp/', + 'lifeTime' => 10 +); + +$cache = new Cache_Lite_Output($options); + +if (!($cache->start('123'))) { + // Cache missed... + for($i=0;$i<1000;$i++) { // Making of the page... + echo('0123456789'); + } + $cache->end(); +} + +?> + +>>> Usage with blocks : +(You can use Cache_Lite_Output for caching blocks and not the whole page) + +<?php + +require_once('Cache/Lite/Output.php'); + +$options = array( + 'cacheDir' => '/tmp/', + 'lifeTime' => 10 +); + +$cache = new Cache_Lite_Output($options); + +if (!($cache->start('block1'))) { + // Cache missed... + echo('Data of the block 1 !<br>'); + $cache->end(); +} + +echo('<br><br>Non cached line !<br><br>'); + +if (!($cache->start('block2'))) { + // Cache missed... + echo('Data of the block 2 !<br>'); + $cache->end(); +} + + +A few examples of Cache_Lite_Function using : +--------------------------------------------- + +>>> With function : + +<?php + +require_once('Cache/Lite/Function.php'); + +$options = array( + 'cacheDir' => '/tmp/', + 'lifeTime' => 10 +); + +$cache = new Cache_Lite_Function($options); + +$cache->call('function_to_bench', 12, 45); + +function function_to_bench($arg1, $arg2) +{ + echo "This is the output of the function function_to_bench($arg1, $arg2) !<br>"; + return "This is the result of the function function_to_bench($arg1, $arg2) !<br>"; +} + +?> + +>>> With method : + +<?php + +require_once('Cache/Lite/Function.php'); + +$options = array( + 'cacheDir' => '/tmp/', + 'lifeTime' => 10 +); + +$cache = new Cache_Lite_Function($options); + +$obj = new bench(); +$obj->test = 666; + +$cache->call('obj->method_to_bench', 12, 45); + +class bench +{ + var $test; + + function method_to_bench($arg1, $arg2) + { + echo "\$obj->test = $this->test and this is the output of the method \$obj->method_to_bench($arg1, $arg2) !<br>"; + return "\$obj->test = $this->test and this is the result of the method \$obj->method_to_bench($arg1, $arg2) !<br>"; + } + +} + +?> + +>>> With static method : + +<?php + +require_once('Cache/Lite/Function.php'); + +$options = array( + 'cacheDir' => '/tmp/', + 'lifeTime' => 10 +); + +$cache = new Cache_Lite_Function($options); + +$cache->call('bench::static_method_to_bench', 12, 45); + +class bench +{ + var $test; + + function static_method_to_bench($arg1, $arg2) { + echo "This is the output of the function static_method_to_bench($arg1, $arg2) !<br>"; + return "This is the result of the function static_method_to_bench($arg1, $arg2) !<br>"; + } +} + +?> + +>>> IMPORTANT : + +If you try to use Cache_Lite_Function with $this object ($cache->call('this->method',...) +for example), have a look first at : + +http://pear.php.net/bugs/bug.php?id=660 + + +A few examples of Cache_Lite_File using : +----------------------------------------- + +<?php + +$options = array( + 'cacheDir' => '/tmp/', + 'masterFile' => '/home/web/config.xml' +); +$cache = new Cache_Lite_File($options); + +// Set a id for this cache +$id = '123'; + +if ($data = $cache->get($id)) { + + // Cache hit ! + // Content is in $data + // (...) + +} else { // No valid cache found (you have to make the page) + + // Cache miss ! + // Put in $data datas to put in cache + // (...) + $cache->save($data); + +} + + +?> diff --git a/lib/docs/UNL_Cache_Lite/docs/technical b/lib/docs/UNL_Cache_Lite/docs/technical new file mode 100644 index 00000000..790696c8 --- /dev/null +++ b/lib/docs/UNL_Cache_Lite/docs/technical @@ -0,0 +1,28 @@ +Technical choices for Cache_Lite... +----------------------------------- + +To begin, the main goals of Cache_Lite : +- performances +- safe use (even on very high traffic or with NFS (file locking doesn't work + with NFS)) +- flexibility (can be used by the end user or as a part of a larger script) + + +For speed reasons, it has been decided to focus on the file container (the +faster one). So, cache is only stored in files. The class is optimized for that. +If you want to use a different cache container, have a look to PEAR/Cache. + +For speed reasons too, the class 'Cache_Lite' has do be independant (so no +'require_once' at all in 'Cache_Lite.php'). But, a conditional include_once +is allowed. For example, when an error is detected, the class include dynamicaly +the PEAR base class 'PEAR.php' to be able to use PEAR::raiseError(). But, in +most cases, PEAR.php isn't included. + +For the second goal (safe use), there is three (optional) mecanisms : +- File Locking : seems to work fine (but not with distributed file system + like NFS...) +- WriteControl : the cache is read and compared just after being stored + (efficient but not perfect) +- ReadControl : a control key (crc32(), md5() ou strlen()) is embeded is the + cache file and compared just after reading (the most efficient + but the slowest) diff --git a/lib/downloads/UNL_Cache_Lite-0.1.0.tgz b/lib/downloads/UNL_Cache_Lite-0.1.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..3d4d5c397f49876f7d3a324277c39fe57d0e2061 GIT binary patch literal 20511 zcmV(xK<K|8iwFP!000001MIy^cN@voAlN;-%JnQ}8DeWppbUZpUlJ*iE{dW`Jf=u} zBxSii+lMECOc41A$b>T!qG-GRMz8zKa#p?RKQRAe{=l4B&wB1FA|vtvKq{50>=sUy zNFpQSapT5)-y2hZ@Xo&tyB{Xw|MYWxHsG_ny<Ph~e0Fv>Hu?7+x5MV}Q*HcgGqOIj zEca6w@=J{MEBrkD9qhb%AEsH9#0M+A?#7A=<3SQc@$JFNo9h>Ak5_(o=sle>o+$a5 zT5s&(JLd0A{0sVwvxAjUo=^AJ*QcSMcBi9hHxBdlAP?51leMDle(q=Q=Db0V*Lp?! z4_Rbd-`(AH@3y*0db_>}NVNXPS7%p)Q8@9}q8N5J9)$2#7VT&B<ykWDbDHYH!4!TL zw(5S!g1IfN<u2O}`&>En)YI6Xgokg=&u)%=nElOJl!s5(=}UMx82ND=jt{A)Sv>B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yDi#PKICoBTl-uePvlcm z>R{}Xe>J*|lQg`+$d4PppQL#U!_wPNJn!KU?{f;G<c9C2%l?K}H{(Unz#?vrFHev- z{R4glQR9q$xxRdJeoVi;y}UR-`=R3@PD5XE`4hm5A|+bTHQl^~E=U|;IEeExe%nzm zZmv$Q&wl^5!#A0?R`Cj>RdsL(Pu^ah9sgdg)4|vDwQYEhboRGrGt|3^r`1mD`UE22 z^r<ga!~3DVAM4;lcSGURi&%0q`C0)GA}Q>LJ%!?rL?am`m&o1RUA)9SVl46GjZoe} zn~Sd7NY|iAd=6DT&Qwb~?Acf|#^RoBb`9Ne40|+&?qgjwL2d(pzl(~HJliqV`KKyG zNowj$;x40$m8$ocZEs8E53!mIVJ)*1tsvtF1o`1@m}jlFx=Z3!iLjRRA*~Rle0^Jx za9&R8-?7@zv39Vn%U6TEkF7n-fMAONHsY(qik$qSF@?F}MD`b<>*aGq$bVeioL`(j z!%Ou#>ht2}<?{lM3^K}u<T79Ap|~@-m|pvHqb&NEn8@H^AM>?>r4kns;1?RK#V}cn z0R`=~PmWJdCszw9XXc_+jYM56j!QxQS(sCe&AuLt=pWfUeJYO_n%G=)n?z`EO(|c9 z2i5^|I<!D<hSDexUwUMzLGkQlU-8A8>U8~rg3z&qhmOfG8EvFszkc~z2T*6Br?J;0 z#<kYgxbo&20J7cvjO6y0W^P|U3qRc{DEjLh%?Vi1?MLxvAA{t--QC*nSpwYtPrcsO z*5=ms#xBW%y^YPCjj!_G7x?@y@c;h`|G)dM|J(cj?!Wjy{_}6Q|HuFHfBxSe{`UXH m|L-q7x38bCpRb><pRb>v@ALl)00030{{sLBhcJ-<OaTB$Rl5iP literal 0 HcmV?d00001 diff --git a/lib/php/UNL/Cache/Lite.php b/lib/php/UNL/Cache/Lite.php new file mode 100644 index 00000000..4c3240a2 --- /dev/null +++ b/lib/php/UNL/Cache/Lite.php @@ -0,0 +1,844 @@ +<?php + +/** +* Fast, light and safe Cache Class +* +* UNL_Cache_Lite is a fast, light and safe cache system. It's optimized +* for file containers. It is fast and safe (because it uses file +* locking and/or anti-corruption tests). +* +* There are some examples in the 'docs/examples' file +* Technical choices are described in the 'docs/technical' file +* +* Memory Caching is from an original idea of +* Mike BENOIT <ipso@snappymail.ca> +* +* Nota : A chinese documentation (thanks to RainX <china_1982@163.com>) is +* available at : +* http://rainx.phpmore.com/manual/UNL_Cache_Lite.html +* +* @package UNL_Cache_Lite +* @category Caching +* @version $Id: Lite.php 283629 2009-07-07 05:34:37Z tacker $ +* @author Fabien MARTY <fab@php.net> +*/ + +define('UNL_CACHE_LITE_ERROR_RETURN', 1); +define('UNL_CACHE_LITE_ERROR_DIE', 8); + +class UNL_Cache_Lite +{ + + // --- Private properties --- + + /** + * Directory where to put the cache files + * (make sure to add a trailing slash) + * + * @var string $_cacheDir + */ + protected $_cacheDir = '/tmp/'; + + /** + * Enable / disable caching + * + * (can be very usefull for the debug of cached scripts) + * + * @var boolean $_caching + */ + protected $_caching = true; + + /** + * Cache lifetime (in seconds) + * + * If null, the cache is valid forever. + * + * @var int $_lifeTime + */ + protected $_lifeTime = 3600; + + /** + * Enable / disable fileLocking + * + * (can avoid cache corruption under bad circumstances) + * + * @var boolean $_fileLocking + */ + protected $_fileLocking = true; + + /** + * Timestamp of the last valid cache + * + * @var int $_refreshTime + */ + protected $_refreshTime; + + /** + * File name (with path) + * + * @var string $_file + */ + protected $_file; + + /** + * File name (without path) + * + * @var string $_fileName + */ + protected $_fileName; + + /** + * Enable / disable write control (the cache is read just after writing to detect corrupt entries) + * + * Enable write control will lightly slow the cache writing but not the cache reading + * Write control can detect some corrupt cache files but maybe it's not a perfect control + * + * @var boolean $_writeControl + */ + protected $_writeControl = true; + + /** + * Enable / disable read control + * + * If enabled, a control key is embeded in cache file and this key is compared with the one + * calculated after the reading. + * + * @var boolean $_writeControl + */ + protected $_readControl = true; + + /** + * Type of read control (only if read control is enabled) + * + * Available values are : + * 'md5' for a md5 hash control (best but slowest) + * 'crc32' for a crc32 hash control (lightly less safe but faster, better choice) + * 'strlen' for a length only test (fastest) + * + * @var boolean $_readControlType + */ + protected $_readControlType = 'crc32'; + + /** + * Pear error mode (when raiseError is called) + * + * (see PEAR doc) + * + * @see setToDebug() + * @var int $_pearErrorMode + */ + protected $_errorMode = UNL_CACHE_LITE_ERROR_RETURN; + + /** + * Current cache id + * + * @var string $_id + */ + protected $_id; + + /** + * Current cache group + * + * @var string $_group + */ + protected $_group; + + /** + * Enable / Disable "Memory Caching" + * + * NB : There is no lifetime for memory caching ! + * + * @var boolean $_memoryCaching + */ + protected $_memoryCaching = false; + + /** + * Enable / Disable "Only Memory Caching" + * (be carefull, memory caching is "beta quality") + * + * @var boolean $_onlyMemoryCaching + */ + protected $_onlyMemoryCaching = false; + + /** + * Memory caching array + * + * @var array $_memoryCachingArray + */ + protected $_memoryCachingArray = array(); + + /** + * Memory caching counter + * + * @var int $memoryCachingCounter + */ + protected $_memoryCachingCounter = 0; + + /** + * Memory caching limit + * + * @var int $memoryCachingLimit + */ + protected $_memoryCachingLimit = 1000; + + /** + * File Name protection + * + * if set to true, you can use any cache id or group name + * if set to false, it can be faster but cache ids and group names + * will be used directly in cache file names so be carefull with + * special characters... + * + * @var boolean $fileNameProtection + */ + protected $_fileNameProtection = true; + + /** + * Enable / disable automatic serialization + * + * it can be used to save directly datas which aren't strings + * (but it's slower) + * + * @var boolean $_serialize + */ + protected $_automaticSerialization = false; + + /** + * Disable / Tune the automatic cleaning process + * + * The automatic cleaning process destroy too old (for the given life time) + * cache files when a new cache file is written. + * 0 => no automatic cache cleaning + * 1 => systematic cache cleaning + * x (integer) > 1 => automatic cleaning randomly 1 times on x cache write + * + * @var int $_automaticCleaning + */ + protected $_automaticCleaningFactor = 0; + + /** + * Nested directory level + * + * Set the hashed directory structure level. 0 means "no hashed directory + * structure", 1 means "one level of directory", 2 means "two levels"... + * This option can speed up UNL_Cache_Lite only when you have many thousands of + * cache file. Only specific benchs can help you to choose the perfect value + * for you. Maybe, 1 or 2 is a good start. + * + * @var int $_hashedDirectoryLevel + */ + protected $_hashedDirectoryLevel = 0; + + /** + * Umask for hashed directory structure + * + * @var int $_hashedDirectoryUmask + */ + protected $_hashedDirectoryUmask = 0700; + + /** + * API break for error handling in UNL_Cache_Lite_ERROR_RETURN mode + * + * In UNL_Cache_Lite_ERROR_RETURN mode, error handling was not good because + * for example save() method always returned a boolean (a PEAR_Error object + * would be better in UNL_Cache_Lite_ERROR_RETURN mode). To correct this without + * breaking the API, this option (false by default) can change this handling. + * + * @var boolean + */ + protected $_errorHandlingAPIBreak = false; + + // --- Public methods --- + + /** + * Constructor + * + * $options is an assoc. Available options are : + * $options = array( + * 'cacheDir' => directory where to put the cache files (string), + * 'caching' => enable / disable caching (boolean), + * 'lifeTime' => cache lifetime in seconds (int), + * 'fileLocking' => enable / disable fileLocking (boolean), + * 'writeControl' => enable / disable write control (boolean), + * 'readControl' => enable / disable read control (boolean), + * 'readControlType' => type of read control 'crc32', 'md5', 'strlen' (string), + * 'pearErrorMode' => pear error mode (when raiseError is called) (cf PEAR doc) (int), + * 'memoryCaching' => enable / disable memory caching (boolean), + * 'onlyMemoryCaching' => enable / disable only memory caching (boolean), + * 'memoryCachingLimit' => max nbr of records to store into memory caching (int), + * 'fileNameProtection' => enable / disable automatic file name protection (boolean), + * 'automaticSerialization' => enable / disable automatic serialization (boolean), + * 'automaticCleaningFactor' => distable / tune automatic cleaning process (int), + * 'hashedDirectoryLevel' => level of the hashed directory system (int), + * 'hashedDirectoryUmask' => umask for hashed directory structure (int), + * 'errorHandlingAPIBreak' => API break for better error handling ? (boolean) + * ); + * + * @param array $options options + * @access public + */ + function __construct($options = array(NULL)) + { + $this->setOptions($options); + } + + /** + * Allows you to set an array of options. + * + * @param array $options associative array of options + */ + function setOptions($options = array(NULL)) + { + foreach($options as $key => $value) { + $this->setOption($key, $value); + } + } + + /** + * Generic way to set a UNL_Cache_Lite option + * + * see UNL_Cache_Lite constructor for available options + * + * @var string $name name of the option + * @var mixed $value value of the option + * @access public + */ + function setOption($name, $value) + { + $availableOptions = array('errorHandlingAPIBreak', 'hashedDirectoryUmask', 'hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode'); + if (in_array($name, $availableOptions)) { + $property = '_'.$name; + $this->$property = $value; + } + } + + /** + * Test if a cache is available and (if yes) return it + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return string data of the cache (else : false) + * @access public + */ + function get($id, $group = 'default', $doNotTestCacheValidity = false) + { + $this->_id = $id; + $this->_group = $group; + $data = false; + if ($this->_caching) { + $this->_setRefreshTime(); + $this->_setFileName($id, $group); + clearstatcache(); + if ($this->_memoryCaching) { + if (isset($this->_memoryCachingArray[$this->_file])) { + if ($this->_automaticSerialization) { + return unserialize($this->_memoryCachingArray[$this->_file]); + } + return $this->_memoryCachingArray[$this->_file]; + } + if ($this->_onlyMemoryCaching) { + return false; + } + } + if (($doNotTestCacheValidity) || (is_null($this->_refreshTime))) { + if (file_exists($this->_file)) { + $data = $this->_read(); + } + } else { + if ((file_exists($this->_file)) && (@filemtime($this->_file) > $this->_refreshTime)) { + $data = $this->_read(); + } + } + if (($data) and ($this->_memoryCaching)) { + $this->_memoryCacheAdd($data); + } + if (($this->_automaticSerialization) and (is_string($data))) { + $data = unserialize($data); + } + return $data; + } + return false; + } + + /** + * Save some data in a cache file + * + * @param string $data data to put in cache (can be another type than strings if automaticSerialization is on) + * @param string $id cache id + * @param string $group name of the cache group + * @return boolean true if no problem (else : false or a PEAR_Error object) + * @access public + */ + function save($data, $id = NULL, $group = 'default') + { + if ($this->_caching) { + if ($this->_automaticSerialization) { + $data = serialize($data); + } + if (isset($id)) { + $this->_setFileName($id, $group); + } + if ($this->_memoryCaching) { + $this->_memoryCacheAdd($data); + if ($this->_onlyMemoryCaching) { + return true; + } + } + if ($this->_automaticCleaningFactor>0 && ($this->_automaticCleaningFactor==1 || mt_rand(1, $this->_automaticCleaningFactor)==1)) { + $this->clean(false, 'old'); + } + if ($this->_writeControl) { + $res = $this->_writeAndControl($data); + if (is_bool($res)) { + if ($res) { + return true; + } + // if $res if false, we need to invalidate the cache + @touch($this->_file, time() - 2*abs($this->_lifeTime)); + return false; + } + } else { + $res = $this->_write($data); + } + if (is_object($res)) { + // $res is a PEAR_Error object + if (!($this->_errorHandlingAPIBreak)) { + return false; // we return false (old API) + } + } + return $res; + } + return false; + } + + /** + * Remove a cache file + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $checkbeforeunlink check if file exists before removing it + * @return boolean true if no problem + * @access public + */ + function remove($id, $group = 'default', $checkbeforeunlink = false) + { + $this->_setFileName($id, $group); + if ($this->_memoryCaching) { + if (isset($this->_memoryCachingArray[$this->_file])) { + unset($this->_memoryCachingArray[$this->_file]); + $this->_memoryCachingCounter = $this->_memoryCachingCounter - 1; + } + if ($this->_onlyMemoryCaching) { + return true; + } + } + if ( $checkbeforeunlink ) { + if (!file_exists($this->_file)) return true; + } + return $this->_unlink($this->_file); + } + + /** + * Clean the cache + * + * if no group is specified all cache files will be destroyed + * else only cache files of the specified group will be destroyed + * + * @param string $group name of the cache group + * @param string $mode flush cache mode : 'old', 'ingroup', 'notingroup', + * 'callback_myFunction' + * @return boolean true if no problem + * @access public + */ + function clean($group = false, $mode = 'ingroup') + { + return $this->_cleanDir($this->_cacheDir, $group, $mode); + } + + /** + * Set to debug mode + * + * When an error is found, the script will stop and the message will be displayed + * (in debug mode only). + * + * @access public + */ + function setToDebug() + { + $this->setOption('pearErrorMode', UNL_CACHE_LITE_ERROR_DIE); + } + + /** + * Set a new life time + * + * @param int $newLifeTime new life time (in seconds) + * @access public + */ + function setLifeTime($newLifeTime) + { + $this->_lifeTime = $newLifeTime; + $this->_setRefreshTime(); + } + + /** + * Save the state of the caching memory array into a cache file cache + * + * @param string $id cache id + * @param string $group name of the cache group + * @access public + */ + function saveMemoryCachingState($id, $group = 'default') + { + if ($this->_caching) { + $array = array( + 'counter' => $this->_memoryCachingCounter, + 'array' => $this->_memoryCachingArray + ); + $data = serialize($array); + $this->save($data, $id, $group); + } + } + + /** + * Load the state of the caching memory array from a given cache file cache + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @access public + */ + function getMemoryCachingState($id, $group = 'default', $doNotTestCacheValidity = false) + { + if ($this->_caching) { + if ($data = $this->get($id, $group, $doNotTestCacheValidity)) { + $array = unserialize($data); + $this->_memoryCachingCounter = $array['counter']; + $this->_memoryCachingArray = $array['array']; + } + } + } + + /** + * Return the cache last modification time + * + * BE CAREFUL : THIS METHOD IS FOR HACKING ONLY ! + * + * @return int last modification time + */ + function lastModified() + { + return @filemtime($this->_file); + } + + /** + * Trigger a PEAR error + * + * To improve performances, the PEAR.php file is included dynamically. + * The file is so included only when an error is triggered. So, in most + * cases, the file isn't included and perfs are much better. + * + * @param string $msg error message + * @param int $code error code + * @access public + */ + function raiseError($msg, $code) + { + throw new Exception($msg, $code); + } + + /** + * Extend the life of a valid cache file + * + * see http://pear.php.net/bugs/bug.php?id=6681 + * + * @access public + */ + function extendLife() + { + @touch($this->_file); + } + + // --- Private methods --- + + /** + * Compute & set the refresh time + * + * @access private + */ + protected function _setRefreshTime() + { + if (is_null($this->_lifeTime)) { + $this->_refreshTime = null; + } else { + $this->_refreshTime = time() - $this->_lifeTime; + } + } + + /** + * Remove a file + * + * @param string $file complete file path and name + * @return boolean true if no problem + * @access private + */ + protected function _unlink($file) + { + if (file_exists($file) && !@unlink($file)) { + return $this->raiseError('UNL_Cache_Lite : Unable to remove cache '.$file, -3); + } + return true; + } + + /** + * Recursive function for cleaning cache file in the given directory + * + * @param string $dir directory complete path (with a trailing slash) + * @param string $group name of the cache group + * @param string $mode flush cache mode : 'old', 'ingroup', 'notingroup', + 'callback_myFunction' + * @return boolean true if no problem + * @access private + */ + protected function _cleanDir($dir, $group = false, $mode = 'ingroup') + { + if ($this->_fileNameProtection) { + $motif = ($group) ? 'unlcache_'.md5($group).'_' : 'unlcache_'; + } else { + $motif = ($group) ? 'unlcache_'.$group.'_' : 'unlcache_'; + } + if ($this->_memoryCaching) { + foreach($this->_memoryCachingArray as $key => $v) { + if (strpos($key, $motif) !== false) { + unset($this->_memoryCachingArray[$key]); + $this->_memoryCachingCounter = $this->_memoryCachingCounter - 1; + } + } + if ($this->_onlyMemoryCaching) { + return true; + } + } + if (!($dh = opendir($dir))) { + return $this->raiseError('UNL_Cache_Lite : Unable to open cache directory !', -4); + } + $result = true; + while ($file = readdir($dh)) { + if (($file != '.') && ($file != '..')) { + if (substr($file, 0, 6)=='unlcache_') { + $file2 = $dir . $file; + if (is_file($file2)) { + switch (substr($mode, 0, 9)) { + case 'old': + // files older than lifeTime get deleted from cache + if (!is_null($this->_lifeTime)) { + if ((time() - @filemtime($file2)) > $this->_lifeTime) { + $result = ($result and ($this->_unlink($file2))); + } + } + break; + case 'notingrou': + if (strpos($file2, $motif) === false) { + $result = ($result and ($this->_unlink($file2))); + } + break; + case 'callback_': + $func = substr($mode, 9, strlen($mode) - 9); + if ($func($file2, $group)) { + $result = ($result and ($this->_unlink($file2))); + } + break; + case 'ingroup': + default: + if (strpos($file2, $motif) !== false) { + $result = ($result and ($this->_unlink($file2))); + } + break; + } + } + if ((is_dir($file2)) and ($this->_hashedDirectoryLevel>0)) { + $result = ($result and ($this->_cleanDir($file2 . '/', $group, $mode))); + } + } + } + } + return $result; + } + + /** + * Add some date in the memory caching array + * + * @param string $data data to cache + * @access private + */ + protected function _memoryCacheAdd($data) + { + $this->_memoryCachingArray[$this->_file] = $data; + if ($this->_memoryCachingCounter >= $this->_memoryCachingLimit) { + list($key, ) = each($this->_memoryCachingArray); + unset($this->_memoryCachingArray[$key]); + } else { + $this->_memoryCachingCounter = $this->_memoryCachingCounter + 1; + } + } + + /** + * Make a file name (with path) + * + * @param string $id cache id + * @param string $group name of the group + * @access private + */ + protected function _setFileName($id, $group) + { + + if ($this->_fileNameProtection) { + $suffix = 'unlcache_'.md5($group).'_'.md5($id); + } else { + $suffix = 'unlcache_'.$group.'_'.$id; + } + $root = $this->_cacheDir; + if ($this->_hashedDirectoryLevel>0) { + $hash = md5($suffix); + for ($i=0 ; $i<$this->_hashedDirectoryLevel ; $i++) { + $root = $root . 'unlcache_' . substr($hash, 0, $i + 1) . '/'; + } + } + $this->_fileName = $suffix; + $this->_file = $root.$suffix; + } + + /** + * Read the cache file and return the content + * + * @return string content of the cache file (else : false or a PEAR_Error object) + * @access private + */ + protected function _read() + { + $fp = @fopen($this->_file, "rb"); + if ($this->_fileLocking) @flock($fp, LOCK_SH); + if ($fp) { + clearstatcache(); + $length = @filesize($this->_file); + $mqr = get_magic_quotes_runtime(); + if ($mqr) { + set_magic_quotes_runtime(0); + } + if ($this->_readControl) { + $hashControl = @fread($fp, 32); + $length = $length - 32; + } + if ($length) { + $data = @fread($fp, $length); + } else { + $data = ''; + } + if ($mqr) { + set_magic_quotes_runtime($mqr); + } + if ($this->_fileLocking) @flock($fp, LOCK_UN); + @fclose($fp); + if ($this->_readControl) { + $hashData = $this->_hash($data, $this->_readControlType); + if ($hashData != $hashControl) { + if (!(is_null($this->_lifeTime))) { + @touch($this->_file, time() - 2*abs($this->_lifeTime)); + } else { + @unlink($this->_file); + } + return false; + } + } + return $data; + } + return $this->raiseError('UNL_Cache_Lite : Unable to read cache !', -2); + } + + /** + * Write the given data in the cache file + * + * @param string $data data to put in cache + * @return boolean true if ok (a PEAR_Error object else) + * @access private + */ + protected function _write($data) + { + if ($this->_hashedDirectoryLevel > 0) { + $hash = md5($this->_fileName); + $root = $this->_cacheDir; + for ($i=0 ; $i<$this->_hashedDirectoryLevel ; $i++) { + $root = $root . 'unlcache_' . substr($hash, 0, $i + 1) . '/'; + if (!(@is_dir($root))) { + @mkdir($root, $this->_hashedDirectoryUmask); + } + } + } + $fp = @fopen($this->_file, "wb"); + if ($fp) { + if ($this->_fileLocking) @flock($fp, LOCK_EX); + if ($this->_readControl) { + @fwrite($fp, $this->_hash($data, $this->_readControlType), 32); + } + $mqr = get_magic_quotes_runtime(); + if ($mqr) { + set_magic_quotes_runtime(0); + } + @fwrite($fp, $data); + if ($mqr) { + set_magic_quotes_runtime($mqr); + } + if ($this->_fileLocking) @flock($fp, LOCK_UN); + @fclose($fp); + return true; + } + return $this->raiseError('UNL_Cache_Lite : Unable to write cache file : '.$this->_file, -1); + } + + /** + * Write the given data in the cache file and control it just after to avoir corrupted cache entries + * + * @param string $data data to put in cache + * @return boolean true if the test is ok (else : false or a PEAR_Error object) + * @access private + */ + protected function _writeAndControl($data) + { + $result = $this->_write($data); + if (is_object($result)) { + return $result; # We return the PEAR_Error object + } + $dataRead = $this->_read(); + if (is_object($dataRead)) { + return $dataRead; # We return the PEAR_Error object + } + if ((is_bool($dataRead)) && (!$dataRead)) { + return false; + } + return ($dataRead==$data); + } + + /** + * Make a control key with the string containing datas + * + * @param string $data data + * @param string $controlType type of control 'md5', 'crc32' or 'strlen' + * @return string control key + * @access private + */ + protected function _hash($data, $controlType) + { + switch ($controlType) { + case 'md5': + return md5($data); + case 'crc32': + return sprintf('% 32d', crc32($data)); + case 'strlen': + return sprintf('% 32d', strlen($data)); + default: + return $this->raiseError('Unknown controlType ! (available values are only \'md5\', \'crc32\', \'strlen\')', -5); + } + } + +} + +?> diff --git a/lib/php/UNL/Cache/Lite/File.php b/lib/php/UNL/Cache/Lite/File.php new file mode 100644 index 00000000..3cbdc19f --- /dev/null +++ b/lib/php/UNL/Cache/Lite/File.php @@ -0,0 +1,91 @@ +<?php + +/** +* This class extends UNL_Cache_Lite and offers a cache system driven by a master file +* +* With this class, cache validity is only dependent of a given file. Cache files +* are valid only if they are older than the master file. It's a perfect way for +* caching templates results (if the template file is newer than the cache, cache +* must be rebuild...) or for config classes... +* There are some examples in the 'docs/examples' file +* Technical choices are described in the 'docs/technical' file +* +* @package UNL_Cache_Lite +* @version $Id: File.php 276823 2009-03-07 12:55:39Z tacker $ +* @author Fabien MARTY <fab@php.net> +*/ + +class UNL_Cache_Lite_File extends UNL_Cache_Lite +{ + + // --- Private properties --- + + /** + * Complete path of the file used for controlling the cache lifetime + * + * @var string $_masterFile + */ + protected $_masterFile = ''; + + /** + * Masterfile mtime + * + * @var int $_masterFile_mtime + */ + protected $_masterFile_mtime = 0; + + // --- Public methods ---- + + /** + * Constructor + * + * $options is an assoc. To have a look at availables options, + * see the constructor of the UNL_Cache_Lite class in 'UNL_Cache_Lite.php' + * + * Comparing to UNL_Cache_Lite constructor, there is another option : + * $options = array( + * (...) see UNL_Cache_Lite constructor + * 'masterFile' => complete path of the file used for controlling the cache lifetime(string) + * ); + * + * @param array $options options + * @access public + */ + function __construct($options = array(NULL)) + { + $options['lifetime'] = 0; + $this->setOptions($options); + if (isset($options['masterFile'])) { + $this->_masterFile = $options['masterFile']; + } else { + return $this->raiseError('UNL_Cache_Lite_File : masterFile option must be set !'); + } + if (!($this->_masterFile_mtime = @filemtime($this->_masterFile))) { + return $this->raiseError('UNL_Cache_Lite_File : Unable to read masterFile : '.$this->_masterFile, -3); + } + } + + /** + * Test if a cache is available and (if yes) return it + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return string data of the cache (else : false) + * @access public + */ + function get($id, $group = 'default', $doNotTestCacheValidity = false) + { + if ($data = parent::get($id, $group, true)) { + if ($filemtime = $this->lastModified()) { + if ($filemtime > $this->_masterFile_mtime) { + return $data; + } + } + } + return false; + } + +} + +?> diff --git a/lib/php/UNL/Cache/Lite/Function.php b/lib/php/UNL/Cache/Lite/Function.php new file mode 100644 index 00000000..a8a268fa --- /dev/null +++ b/lib/php/UNL/Cache/Lite/Function.php @@ -0,0 +1,209 @@ +<?php + +/** +* This class extends UNL_Cache_Lite and can be used to cache the result and output of functions/methods +* +* This class is completly inspired from Sebastian Bergmann's +* PEAR/Cache_Function class. This is only an adaptation to +* UNL_Cache_Lite +* +* There are some examples in the 'docs/examples' file +* Technical choices are described in the 'docs/technical' file +* +* @package UNL_Cache_Lite +* @version $Id: Function.php 225008 2006-12-14 12:59:43Z cweiske $ +* @author Sebastian BERGMANN <sb@sebastian-bergmann.de> +* @author Fabien MARTY <fab@php.net> +*/ + +class UNL_Cache_Lite_Function extends UNL_Cache_Lite +{ + + // --- Private properties --- + + /** + * Default cache group for function caching + * + * @var string $_defaultGroup + */ + protected $_defaultGroup = 'UNL_Cache_Lite_Function'; + + /** + * Don't cache the method call when its output contains the string "NOCACHE" + * + * if set to true, the output of the method will never be displayed (because the output is used + * to control the cache) + * + * @var boolean $_dontCacheWhenTheOutputContainsNOCACHE + */ + protected $_dontCacheWhenTheOutputContainsNOCACHE = false; + + /** + * Don't cache the method call when its result is false + * + * @var boolean $_dontCacheWhenTheResultIsFalse + */ + protected $_dontCacheWhenTheResultIsFalse = false; + + /** + * Don't cache the method call when its result is null + * + * @var boolean $_dontCacheWhenTheResultIsNull + */ + protected $_dontCacheWhenTheResultIsNull = false; + + /** + * Debug the UNL_Cache_Lite_Function caching process + * + * @var boolean $_debugCacheLiteFunction + */ + protected $_debugCacheLiteFunction = false; + + // --- Public methods ---- + + /** + * Constructor + * + * $options is an assoc. To have a look at availables options, + * see the constructor of the UNL_Cache_Lite class in 'UNL_Cache_Lite.php' + * + * Comparing to UNL_Cache_Lite constructor, there is another option : + * $options = array( + * (...) see UNL_Cache_Lite constructor + * 'debugCacheLiteFunction' => (bool) debug the caching process, + * 'defaultGroup' => default cache group for function caching (string), + * 'dontCacheWhenTheOutputContainsNOCACHE' => (bool) don't cache when the function output contains "NOCACHE", + * 'dontCacheWhenTheResultIsFalse' => (bool) don't cache when the function result is false, + * 'dontCacheWhenTheResultIsNull' => (bool don't cache when the function result is null + * ); + * + * @param array $options options + * @access public + */ + function __construct($options = array(NULL)) + { + $availableOptions = array('debugCacheLiteFunction', 'defaultGroup', 'dontCacheWhenTheOutputContainsNOCACHE', 'dontCacheWhenTheResultIsFalse', 'dontCacheWhenTheResultIsNull'); + while (list($name, $value) = each($options)) { + if (in_array($name, $availableOptions)) { + $property = '_'.$name; + $this->$property = $value; + } + } + reset($options); + $this->setOptions($options); + } + + /** + * Calls a cacheable function or method (or not if there is already a cache for it) + * + * Arguments of this method are read with func_get_args. So it doesn't appear + * in the function definition. Synopsis : + * call('functionName', $arg1, $arg2, ...) + * (arg1, arg2... are arguments of 'functionName') + * + * @return mixed result of the function/method + * @access public + */ + function call() + { + $arguments = func_get_args(); + $id = $this->_makeId($arguments); + $data = $this->get($id, $this->_defaultGroup); + if ($data !== false) { + if ($this->_debugCacheLiteFunction) { + echo "Cache hit !\n"; + } + $array = unserialize($data); + $output = $array['output']; + $result = $array['result']; + } else { + if ($this->_debugCacheLiteFunction) { + echo "Cache missed !\n"; + } + ob_start(); + ob_implicit_flush(false); + $target = array_shift($arguments); + if (is_array($target)) { + // in this case, $target is for example array($obj, 'method') + $object = $target[0]; + $method = $target[1]; + $result = call_user_func_array(array(&$object, $method), $arguments); + } else { + if (strstr($target, '::')) { // classname::staticMethod + list($class, $method) = explode('::', $target); + $result = call_user_func_array(array($class, $method), $arguments); + } else if (strstr($target, '->')) { // object->method + // use a stupid name ($objet_123456789 because) of problems where the object + // name is the same as this var name + list($object_123456789, $method) = explode('->', $target); + global $$object_123456789; + $result = call_user_func_array(array($$object_123456789, $method), $arguments); + } else { // function + $result = call_user_func_array($target, $arguments); + } + } + $output = ob_get_contents(); + ob_end_clean(); + if ($this->_dontCacheWhenTheResultIsFalse) { + if ((is_bool($result)) && (!($result))) { + echo($output); + return $result; + } + } + if ($this->_dontCacheWhenTheResultIsNull) { + if (is_null($result)) { + echo($output); + return $result; + } + } + if ($this->_dontCacheWhenTheOutputContainsNOCACHE) { + if (strpos($output, 'NOCACHE') > -1) { + return $result; + } + } + $array['output'] = $output; + $array['result'] = $result; + $this->save(serialize($array), $id, $this->_defaultGroup); + } + echo($output); + return $result; + } + + /** + * Drop a cache file + * + * Arguments of this method are read with func_get_args. So it doesn't appear + * in the function definition. Synopsis : + * remove('functionName', $arg1, $arg2, ...) + * (arg1, arg2... are arguments of 'functionName') + * + * @return boolean true if no problem + * @access public + */ + function drop() + { + $id = $this->_makeId(func_get_args()); + return $this->remove($id, $this->_defaultGroup); + } + + /** + * Make an id for the cache + * + * @var array result of func_get_args for the call() or the remove() method + * @return string id + * @access private + */ + function _makeId($arguments) + { + $id = serialize($arguments); // Generate a cache id + if (!$this->_fileNameProtection) { + $id = md5($id); + // if fileNameProtection is set to false, then the id has to be hashed + // because it's a very bad file name in most cases + } + return $id; + } + +} + +?> diff --git a/lib/php/UNL/Cache/Lite/NestedOutput.php b/lib/php/UNL/Cache/Lite/NestedOutput.php new file mode 100644 index 00000000..06d10f5d --- /dev/null +++ b/lib/php/UNL/Cache/Lite/NestedOutput.php @@ -0,0 +1,55 @@ +<?php + +/** +* This class extends UNL_Cache_Lite and uses output buffering to get the data to cache. +* It supports nesting of caches +* +* @package UNL_Cache_Lite +* @version $Id: NestedOutput.php 279664 2009-05-01 13:19:25Z tacker $ +* @author Markus Tacker <tacker@php.net> +*/ + +class UNL_Cache_Lite_NestedOutput extends UNL_Cache_Lite_Output +{ + private $nestedIds = array(); + private $nestedGroups = array(); + + /** + * Start the cache + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return boolean|string false if the cache is not hit else the data + * @access public + */ + function start($id, $group = 'default', $doNotTestCacheValidity = false) + { + $this->nestedIds[] = $id; + $this->nestedGroups[] = $group; + $data = $this->get($id, $group, $doNotTestCacheValidity); + if ($data !== false) { + return $data; + } + ob_start(); + ob_implicit_flush(false); + return false; + } + + /** + * Stop the cache + * + * @param boolen + * @return string return contents of cache + */ + function end() + { + $data = ob_get_contents(); + ob_end_clean(); + $id = array_pop($this->nestedIds); + $group = array_pop($this->nestedGroups); + $this->save($data, $id, $group); + return $data; + } + +} \ No newline at end of file diff --git a/lib/php/UNL/Cache/Lite/Output.php b/lib/php/UNL/Cache/Lite/Output.php new file mode 100644 index 00000000..9b9f45ff --- /dev/null +++ b/lib/php/UNL/Cache/Lite/Output.php @@ -0,0 +1,70 @@ +<?php + +/** +* This class extends UNL_Cache_Lite and uses output buffering to get the data to cache. +* +* There are some examples in the 'docs/examples' file +* Technical choices are described in the 'docs/technical' file +* +* @package UNL_Cache_Lite +* @version $Id: Output.php 206076 2006-01-29 00:22:07Z fab $ +* @author Fabien MARTY <fab@php.net> +*/ + +class UNL_Cache_Lite_Output extends UNL_Cache_Lite +{ + + // --- Public methods --- + + /** + * Constructor + * + * $options is an assoc. To have a look at availables options, + * see the constructor of the UNL_Cache_Lite class in 'UNL_Cache_Lite.php' + * + * @param array $options options + * @access public + */ + function __construct($options = array(NULL)) + { + $this->setOptions($options); + } + + /** + * Start the cache + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return boolean true if the cache is hit (false else) + * @access public + */ + function start($id, $group = 'default', $doNotTestCacheValidity = false) + { + $data = $this->get($id, $group, $doNotTestCacheValidity); + if ($data !== false) { + echo($data); + return true; + } + ob_start(); + ob_implicit_flush(false); + return false; + } + + /** + * Stop the cache + * + * @access public + */ + function end() + { + $data = ob_get_contents(); + ob_end_clean(); + $this->save($data, $this->_id, $this->_group); + echo($data); + } + +} + + +?> -- GitLab