<commit_before>kohana2-cache-mongo
===================

MongoDB-based cache driver for the Kohana v2.x PHP Framework, with tags support.

## Requirements ##

- PHP 5.2+
- php-mongo (offical MongoDB extension for PHP, http://www.php.net/manual/en/book.mongo.php)
- a running MongoDB instance.

## Installation ##
	
*Option 1*
- Just copy the driver file to librares/drivers/Cache, and copy the config content to config/cache.php 
- Don't forget honoring the Kohana v2 hierarchical directory structure.

*Option 2*
- Use this as a project as a module, enabling it in config.php (using MODPATH.'kohana2-cache-mongo')

## Configuration ##

Open the config/cache.php file and configure MongoDB's host and port (localhost:27017 is the default), and (optionally) database and collection. 

## Usage ##

This should be transparent if you're already familiar with Kohana's caching system.
	
	$cache = Cache::instance('mongo');
	$cache->set( ... ); // Cache an item
	$cache->get('some-id'); // Get a cached item
	$cache->delete('some-id'); // Delete a cached item
	$cache->delete_tag('some-tag'); // Delete all items with a certain tag
	
For more information, check Kohana v2's caching interface: http://docs.kohanaphp.com/libraries/cache

## Additional tips ##

- You can configure this as your 'default' cache driver, if you want. 
- You can use multiple configuration sets, using different combinations of databases and collections (or even MongoDB's instances, althout that may be too much). That will allow having multiple cache storages, each one with a specific purpose. You can interact with each one of those storages individually.<commit_msg>updating readme<commit_after>kohana2-cache-mongo
===================

MongoDB-based cache driver for the Kohana v2.x PHP Framework, with tags support.

## Requirements ##

- PHP 5.2+
- php-mongo (offical MongoDB extension for PHP, http://www.php.net/manual/en/book.mongo.php)
- a running MongoDB instance.

## Installation ##
	
*Option 1*
- Just copy the driver file to librares/drivers/Cache, and copy the config content to config/cache.php 
- Don't forget honoring the Kohana v2 hierarchical directory structure.

*Option 2*
- Use this as a project as a module, enabling it in config.php (using MODPATH.'kohana2-cache-mongo')

## Configuration ##

- Open the config/cache.php file and configure MongoDB's host and port (localhost:27017 is the default)
- Optionally, configure a specific database and collection. 

## Usage ##

This should be transparent if you're already familiar with Kohana's caching system.
	
	$cache = Cache::instance('mongo');
	$cache->set( ... ); // Cache an item
	$cache->get('some-id'); // Get a cached item
	$cache->delete('some-id'); // Delete a cached item
	$cache->delete_tag('some-tag'); // Delete all items with a certain tag
	
For more information, check Kohana v2's caching interface: http://docs.kohanaphp.com/libraries/cache

## Additional tips ##

- You can configure this as your 'default' cache driver, if you want. 
- You can use multiple configuration sets, using different combinations of databases and collections (or even MongoDB's instances, althout that may be too much). That will allow having multiple cache storages, each one with a specific purpose. You can interact with each one of those storages individually.
{'fraction_non_alphanumeric': 0.11013615733736762, 'fraction_numerical': 0.008472012102874432, 'mean_word_length': 4.247619047619048, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3967352', 'n_tokens_mistral': 989, 'n_tokens_neox': 912, 'n_words': 392}