Skip to content

Commit fb724ef

Browse files
authored
Merge branch 'final' into final
2 parents 606dc6f + 0cb0817 commit fb724ef

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

README.md

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Code Climate](https://codeclimate.com/github/PHPSocialNetwork/phpfastcache/badges/gpa.svg)](https://codeclimate.com/github/PHPSocialNetwork/phpfastcache) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/PHPSocialNetwork/phpfastcache/badges/quality-score.png?b=final)](https://scrutinizer-ci.com/g/PHPSocialNetwork/phpfastcache/?branch=final) [![Build Status](https://travis-ci.org/PHPSocialNetwork/phpfastcache.svg?branch=final)](https://travis-ci.org/PHPSocialNetwork/phpfastcache) [![Latest Stable Version](http://img.shields.io/packagist/v/phpfastcache/phpfastcache.svg)](https://packagist.org/packages/phpfastcache/phpfastcache) [![Total Downloads](http://img.shields.io/packagist/dt/phpfastcache/phpfastcache.svg)](https://packagist.org/packages/phpfastcache/phpfastcache) [![Dependency Status](https://www.versioneye.com/php/phpfastcache:phpfastcache/badge.svg)](https://www.versioneye.com/php/phpfastcache:phpfastcache) [![License](https://img.shields.io/packagist/l/phpfastcache/phpfastcache.svg)](https://packagist.org/packages/phpfastcache/phpfastcache) [![Coding Standards](https://img.shields.io/badge/CI-PSR6-orange.svg)](https://github.com/php-fig/cache)
1+
[![Code Climate](https://codeclimate.com/github/PHPSocialNetwork/phpfastcache/badges/gpa.svg)](https://codeclimate.com/github/PHPSocialNetwork/phpfastcache) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/PHPSocialNetwork/phpfastcache/badges/quality-score.png?b=final)](https://scrutinizer-ci.com/g/PHPSocialNetwork/phpfastcache/?branch=final) [![Build Status](https://travis-ci.org/PHPSocialNetwork/phpfastcache.svg?branch=final)](https://travis-ci.org/PHPSocialNetwork/phpfastcache) [![Latest Stable Version](http://img.shields.io/packagist/v/phpfastcache/phpfastcache.svg)](https://packagist.org/packages/phpfastcache/phpfastcache) [![Total Downloads](http://img.shields.io/packagist/dt/phpfastcache/phpfastcache.svg)](https://packagist.org/packages/phpfastcache/phpfastcache) [![Dependency Status](https://www.versioneye.com/php/phpfastcache:phpfastcache/badge.svg)](https://www.versioneye.com/php/phpfastcache:phpfastcache) [![License](https://img.shields.io/packagist/l/phpfastcache/phpfastcache.svg)](https://packagist.org/packages/phpfastcache/phpfastcache) [![Coding Standards](https://img.shields.io/badge/CI-PSR6-orange.svg)](https://github.com/php-fig/cache)
22

33
:exclamation: V4 USERS, PLEASE SEE THE README !! THE V5 IS OFFICIALY OUT !! YOUR CODE NEEDS TO BE REWRITTEN :exclamation:
44

@@ -27,15 +27,15 @@ One Class uses for All Cache. You don't need to rewrite your code many times aga
2727
\* Driver descriptions available in DOCS/DRIVERS.md
2828

2929
### Symfony developers are not forgotten !
30-
Starting of the v5, phpFastCache comes with a [Symfony Bundle](https://github.com/PHPSocialNetwork/phpfastcache-bundle).
31-
He's fresh, so feel free to report any bug or contribute to the code using pull requests.
30+
Starting with v5, phpFastCache comes with a [Symfony Bundle](https://github.com/PHPSocialNetwork/phpfastcache-bundle).
31+
It's fresh, so feel free to report any bug or contribute to the project using pull requests.
3232

3333
---------------------------
3434
Not a "Traditional" Caching
3535
---------------------------
36-
phpFastCache is not a traditional caching method which is keep read and write to files, sqlite or mass connections to memcache, redis, mongodb... Also, when you use Memcache / Memcached, your miss hits will be reduce.
37-
Different with normal caching methods which shared everywhere on internet, phpFastCache Lib reduce the high I/O load, and faster than traditional caching method at least x7 ~+ times.
38-
However, some time you still want to use traditional caching, we support them too.
36+
phpFastCache is not like the traditional caching methods which keep reading and writing to files, sqlite or keeping open massive amounts of connections to memcache, redis, mongodb... Also, when you use Memcache / Memcached, your miss hits will be reduced.
37+
Different from the usual caching methods you'll find everywhere on the internet, the phpFastCache library reduces high I/O load, and is faster than the traditional caching methods by at least ~7 times.
38+
However, when you still want to use traditional caching methods, we support them too.
3939

4040
```php
4141
use phpFastCache\CacheManager;
@@ -50,8 +50,8 @@ CacheManager::Files($config);
5050
Reduce Database Calls
5151
---------------------------
5252

53-
Your website have 10,000 visitors who are online, and your dynamic page have to send 10,000 same queries to database on every page load.
54-
With phpFastCache, your page only send 1 query to DB, and use the cache to serve 9,999 other visitors.
53+
Your website has 10,000 visitors who are online, and your dynamic page has to send 10,000 times the same queries to database on every page load.
54+
With phpFastCache, your page only sends 1 query to your DB, and uses the cache to serve the 9,999 other visitors.
5555

5656
---------------------------
5757
Rich Development API
@@ -60,59 +60,59 @@ Rich Development API
6060
phpFastCache offers you a lot of useful APIs:
6161

6262
### Item API
63-
- getKey() // Return the item identifier (key)
64-
- get() // The getter, obviously, return your cache object
65-
- set($value) // The setter, for those who missed it, put 0 meant cache it forever
66-
- expiresAfter($ttl) // Allow you to extends the lifetime of an entry without altering the value (formerly known as touch())
63+
- getKey() // Returns the item identifier (key)
64+
- get() // The getter, obviously, returns your cache object
65+
- set($value) // The setter, for those who missed it, putting 0 means cache it forever
66+
- expiresAfter($ttl) // Allow you to extend the lifetime of an entry without altering its value (formerly known as touch())
6767
- expiresAt($expiration) // Sets the expiration time for this cache item (as a DateTimeInterface object)
68-
- increment($step = 1) // For integer that we can count on
68+
- increment($step = 1) // To allow us to count on an integer item
6969
- decrement($step = 1) // Redundant joke...
70-
- append($data) // Append data to a string or an array (push)
71-
- prepend($data) // Prepend data to a string or an array (unshift)
72-
- isHit() // Check if your cache entry exists and is still valid, it is the equivalent of isset()
73-
- isExpired() // Check if your cache entry is expired
74-
- getTtl() // Get the remaining Time To Live as an integer
75-
- getExpirationDate() // Get the expiration date as a Datetime object
76-
- addTag($tagName) // Add a tag
77-
- addTags(array $tagNames) // Add many tags
78-
- setTags(array $tags) // Set some tags
79-
- getTags() // Get the tags
80-
- getTagsAsString($separator = ', ') // Get the data a string separated by $separator
81-
- removeTag($tagName) // Remove a tag
82-
- removeTags(array $tagNames) // Remove some tags
83-
- getDataAsJsonString()// Return the data as a well-formatted json string
70+
- append($data) // Appends data to a string or an array (push)
71+
- prepend($data) // Prepends data to a string or an array (unshift)
72+
- isHit() // Checks if your cache entry exists and is still valid, it's the equivalent of isset()
73+
- isExpired() // Checks if your cache entry is expired
74+
- getTtl() // Gets the remaining Time To Live as an integer
75+
- getExpirationDate() // Gets the expiration date as a Datetime object
76+
- addTag($tagName) // Adds a tag
77+
- addTags(array $tagNames) // Adds multiple tags
78+
- setTags(array $tags) // Sets multiple tags
79+
- getTags() // Gets the tags
80+
- getTagsAsString($separator = ', ') // Gets the data as a string separated by $separator
81+
- removeTag($tagName) // Removes a tag
82+
- removeTags(array $tagNames) // Removes some tags
83+
- getDataAsJsonString()// Returns the data as a well-formatted json string
8484

8585
### ItemPool API
86-
- getItem($key) // Retrieve an item and returns an empty item if not found
87-
- getItems(array $keys) // Retrieve one or more item and returns an array of items
88-
- getItemsAsJsonString(array $keys) // Returns A json string that represents an array of items
86+
- getItem($key) // Retrieves an item and returns an empty item if not found
87+
- getItems(array $keys) // Retrieves one or more items and returns an array of items
88+
- getItemsAsJsonString(array $keys) // Returns a json string that represents an array of items
8989
- hasItem($key) // Tests if an item exists
90-
- deleteItem($key) // Delete an item
91-
- deleteItems(array $keys) // Delete one or more items
90+
- deleteItem($key) // Deletes an item
91+
- deleteItems(array $keys) // Deletes one or more items
9292
- save(CacheItemInterface $item) // Persists a cache item immediately
9393
- saveDeferred(CacheItemInterface $item); // Sets a cache item to be persisted later
9494
- commit(); // Persists any deferred cache items
95-
- clear() // Allow you to completely empty the cache and restart from the beginning
96-
- getStats() // Return the cache statistics as an object, useful for checking disk space used by the cache etc.
97-
- getItemsByTag($tagName) // Return items by a tag
98-
- getItemsByTags(array $tagNames) // Return items by some tags
99-
- getItemsByTagsAsJsonString(array $tagNames) // Returns A json string that represents an array of items by tags-based
100-
- deleteItemsByTag($tagName) // Delete items by a tag
101-
- deleteItemsByTags(array $tagNames) // Delete items by some tags
102-
- incrementItemsByTag($tagName, $step = 1) // Increment items by a tag
103-
- incrementItemsByTags(array $tagNames, $step = 1) // Increment items by some tags
104-
- decrementItemsByTag($tagName, $step = 1) // Decrement items by a tag
105-
- decrementItemsByTags(array $tagNames, $step = 1) // Decrement items by some tags
106-
- appendItemsByTag($tagName, $data) // Append items by a tag
107-
- appendItemsByTags(array $tagNames, $data) // Append items by some tags
108-
- prependItemsByTag($tagName, $data) // Prepend items by a tag
109-
- prependItemsByTags(array $tagNames, $data) // Prepend items by some tags
110-
- detachItem($item) // Detach an item from the pool
111-
- detachAllItems($item) // Detach all items from the pool
112-
- attachItem($item) // (Re-)attach an item to the pool
113-
- isAttached($item) // Verify if an item is (still) attached
114-
115-
Also support Multiple calls, Tagging, Setup Folder for caching. Look at our examples folders.
95+
- clear() // Allows you to completely empty the cache
96+
- getStats() // Returns the cache statistics as an object, useful for checking disk space used by the cache etc.
97+
- getItemsByTag($tagName) // Returns items by a tag
98+
- getItemsByTags(array $tagNames) // Returns items by multiple tags
99+
- getItemsByTagsAsJsonString(array $tagNames) // Returns a json string that represents an array of items corresponding to given tags
100+
- deleteItemsByTag($tagName) // Deletes items by a tag
101+
- deleteItemsByTags(array $tagNames) // Deletes items by multiple tags
102+
- incrementItemsByTag($tagName, $step = 1) // Increments items by a tag
103+
- incrementItemsByTags(array $tagNames, $step = 1) // Increments items by multiple tags
104+
- decrementItemsByTag($tagName, $step = 1) // Decrements items by a tag
105+
- decrementItemsByTags(array $tagNames, $step = 1) // Decrements items by multiple tags
106+
- appendItemsByTag($tagName, $data) // Appends items by a tag
107+
- appendItemsByTags(array $tagNames, $data) // Appends items by multiple tags
108+
- prependItemsByTag($tagName, $data) // Prepends items by a tag
109+
- prependItemsByTags(array $tagNames, $data) // Prepends items by multiple tags
110+
- detachItem($item) // Detaches an item from the pool
111+
- detachAllItems($item) // Detaches all items from the pool
112+
- attachItem($item) // (Re-)attaches an item to the pool
113+
- isAttached($item) // Verifies if an item is (still) attached
114+
115+
It also supports Multiple calls, Tagging, Setup Folder for caching. Look at our examples folders for more information.
116116

117117
---------------------------
118118
As Fast To Implement As Opening a Beer
@@ -126,7 +126,7 @@ As Fast To Implement As Opening a Beer
126126
composer require phpFastCache/phpFastCache
127127
```
128128

129-
#### :construction: Step 2: Setup your website code to implements phpFastCache bits (With Composer)
129+
#### :construction: Step 2: Setup your website code to implement the phpFastCache calls (with Composer)
130130
```php
131131
use phpFastCache\CacheManager;
132132

@@ -161,11 +161,11 @@ if (is_null($CachedString->get())) {
161161

162162
} else {
163163
echo "READ FROM CACHE // ";
164-
echo $CachedString->get()[0];// Will prints 'First product'
164+
echo $CachedString->get()[0];// Will print 'First product'
165165
}
166166

167167
/**
168-
* use your products here or return it;
168+
* use your products here or return them;
169169
*/
170170
echo implode('<br />', $CachedString->get());// Will echo your product list
171171

@@ -174,8 +174,8 @@ echo implode('<br />', $CachedString->get());// Will echo your product list
174174
##### :floppy_disk: Legacy / Lazy Method (Without Composer)
175175
* See the file examples/legacy.php for more information.
176176

177-
#### :zap: Step 3: Enjoy ! Your website is now faster than flash !
178-
For curious developpers, there is a lot of others available examples [here](https://github.com/PHPSocialNetwork/phpfastcache/tree/final/examples).
177+
#### :zap: Step 3: Enjoy ! Your website is now faster than lightning !
178+
For curious developpers, there is a lot of other examples available [here](https://github.com/PHPSocialNetwork/phpfastcache/tree/final/examples).
179179

180180
#### :boom: phpFastCache support
181-
Found an issue or had an idea ? Come [here](https://github.com/PHPSocialNetwork/phpfastcache/issues) and let us know !
181+
Found an issue or have an idea ? Come [here](https://github.com/PHPSocialNetwork/phpfastcache/issues) and let us know !

0 commit comments

Comments
 (0)