package Cpanel::Easy::Apache::DiskCache;

# cpanel - Cpanel/Easy/Apache/DiskCache.pm        Copyright(c) 2012 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

our $easyconfig = {
    'name'    => 'Disk Cache',
    'url'     => 'http://httpd.apache.org/docs/[% apache_uri_version %]/mod/mod_cache_disk.html',
    'implies' => { 'Cpanel::Easy::Apache::Cache' => 1 },
    'modself' => sub {
        my ( $easy, $self_hr, $profile_hr ) = @_;

        # incompatible with mod_ruid2
        if ( $profile_hr->{'Cpanel::Easy::ModRuid2'} ) {
            $self_hr->{'skip'} = 1;
        }
    },

    'step' => {
        '0' => {
            'name'    => 'to config options',
            'command' => sub {
                my ($self) = @_;

                # NOTE: The module was renamed from mod_disk_cache, to mod_cache_disk
                $self->add_to_configure( { '--enable-cache-disk' => ['static'] } );
                return ( 1, 'Ok' );
            },
        },
    },
};

1;
