Welcome Guest, Not a member yet? Register   Sign In
Please help!! (ORM Datamapper Cache)
#1

[eluser]devbashar[/eluser]
The cache is not being created.

Here my config:

config/datamapper.php

Code:
$config['production_cache'] = 'datamapper/cache';
$config['extensions_path'] = 'datamapper';
$config['extensions'] = array('simplecache');

config/database.php

Code:
$db['default']['cache_on'] = TRUE;
$db['default']['cachedir'] = 'application/datamapper/cache'; // I tried also'datamapper/cache'

get function

function get_names() {
$o = new db_names();
$o->order_by('name');
$o->get_cached(10);
return $o;
}

the folder 'datamapper/cache' is writable

Is there something wrong? or missing?
#2

[eluser]WanWizard[/eluser]
Simplecache is just a wrapper around http://ellislab.com/codeigniter/user-gui...ching.html, it doesn't do anything by itself.

This means that probably your CI database config is not ok (it is not configured through the datamapper config file).
#3

[eluser]devbashar[/eluser]
there is no other config must i do!
that what i found in the manual
#4

[eluser]WanWizard[/eluser]
See http://ellislab.com/codeigniter/user-gui...ching.html, under "Enabling caching".

Datamapper doesn't do anything itself, it simply calls $this->db->cache_on().
#5

[eluser]devbashar[/eluser]
[quote author="WanWizard" date="1385368898"]See http://ellislab.com/codeigniter/user-gui...ching.html, under "Enabling caching".

Datamapper doesn't do anything itself, it simply calls $this->db->cache_on().[/quote]

I tried to enable the caching feature from config/database.php
and also try to set manual

Code:
$this->db->cache_on();

but it still not working i will try to upgrade my CI version and Datamapper new vision also

thank you for your help..
#6

[eluser]Damir Sivic[/eluser]
Hi, I am using HMVC and Datamapper ORM, and everything works great.

But, when I try to use Production Cache, I get an error "Class can not be found".

Cache folder is ok, and files are generated.


solved:

https://bitbucket.org/wanwizard/datamapp...c57ef2c671




Theme © iAndrew 2016 - Forum software by © MyBB