<commit_before># activerecord_session_cleaner [![Gem Version](https://badge.fury.io/rb/activerecord_session_cleaner.png)](http://badge.fury.io/rb/activerecord_session_cleaner)

Gem to remove old sessions from your ActiveRecord DB.

## Features

* Delete all sessions
* Delete sessions not updated in the last `$x` days
* Setup cleanup cron to delete old sessions

## Tasks

    # Delete old sessions from an Active Record session store
    rake activerecord_session_cleaner:cleanup:old[days_to_keep]
    # Delete all session from an Active Record session store
    rake activerecord_session_cleaner:cleanup:all

    # Setup/update cron for session cleanup
    rake activerecord_session_cleaner:crontab:update[application_name,days_to_keep]
    # Remove cleanup cron for session cleanup
    rake activerecord_session_cleaner:crontab:clear[application_name]<commit_msg>Installation instructions, kudos to @calmyournerves<commit_after># activerecord_session_cleaner [![Gem Version](https://badge.fury.io/rb/activerecord_session_cleaner.png)](http://badge.fury.io/rb/activerecord_session_cleaner)

Gem to remove old sessions from your ActiveRecord DB.

## Installation

In your Gemfile, add:

``` ruby
gem 'activerecord_session_cleaner'
```

## Features

* Delete all sessions
* Delete sessions not updated in the last `$x` days
* Setup cleanup cron to delete old sessions

## Tasks

    # Delete old sessions from an Active Record session store
    rake activerecord_session_cleaner:cleanup:old[days_to_keep]
    # Delete all session from an Active Record session store
    rake activerecord_session_cleaner:cleanup:all

    # Setup/update cron for session cleanup
    rake activerecord_session_cleaner:crontab:update[application_name,days_to_keep]
    # Remove cleanup cron for session cleanup
    rake activerecord_session_cleaner:crontab:clear[application_name]
{'fraction_non_alphanumeric': 0.07092960773777539, 'fraction_numerical': 0.0, 'mean_word_length': 5.579505300353357, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '6898393', 'n_tokens_mistral': 581, 'n_tokens_neox': 527, 'n_words': 153}