Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Memcache
  • Hi,
    I am trying to get working my application on two servsers: on a linux one and a windows one.
    On the linux one I use memcached for caching, but it is not working on windows.

    Can I turn off caching from the application. I mean I would extend the cache class, and I would like to exchange this line to something else:

    throw new \FuelException('Memcache cache are configured, but your PHP installation doesn\'t have the Memcache extension loaded.');

    What should I do? I cannot just turn it off in the configuration, because we are using the same git repository for a windows and a linux development machine.
  • create a 'cache.php' in config folder with:

    return array(
        'driver' => 'file' // or null

    );


    don't commit this file.
  • ssianggessiangge
    Accepted Answer
    I got another way to do this.
    Since FuelPHP config files have moved to core/config/ folder ( I'm not sure since which version ), you can have your own config file in app/config folder.

    So I can create a sample config file in app/config with name like config.sample.php . Every workstation will then have to create their own config file and is excluded/ignored in Git. They can just clone the sample file to the actual file name e.g. config.sample.php => config.php.

    This method save my time when other developers used different OS or even on Production server. I also can hide the production server sensitive data from the developers e.g. secret key, etc.
  • I should have done this before asking stupid questions. Thanks
  • Cheers.

    It's not stupid. :-)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion