-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Public cache functions #212
Comments
What do you need to do this for? Why do you need to overload those methods? |
I have put Idiorm adapter in my CMS yesterday Now i want to migrate all my queries to Idiorm and ditch the old ugly DB functions. The problem is that i have internal cache system i want to use. The CMS is query heavy and relies on cache (Files, APC or memcache) I need a way to swap the idiorm cache functions. I need to cache the data on Maybe adding a |
Do you want me to try to implement this? and somehow work this out in Idirom class I badly need external caching mechanism |
So in this case why don't you just cache the result in your adapter rather than in Idiorm directly? |
Hi, this is test adapter and just made it to see if i can hack the table prefix I don't want to override the functions by extending them and breaking the compatibility with the On the other hand: If we can put a cache callback functions though |
I am really not so sure about this as caching is not really a core concern of Idiorm itself. On the other hand it does seem logical that as we do have caching that it should be more controllable. If you do decide to implement this then to ensure it gets included please remember to include documentation and tests in your pull request. Please remember to update the changelog in the readme too. |
Hi, |
I have added support of callbacks Now you can set custom functions via
|
Closing and moving discussion to pull request. |
This is a combination of 20 commits: added cache callback #212 added test Added text for custom cache formating and tests added caching_auto_clear option moved custom cache test for php 5.3+ fixed ConfigTest.php tabs to spaces formating formating added `create_cache_key` callback option added $table_name to clear cache function added $table_name to _create_cache_key added missing params added $table_name to cache_query_result formating tabs added $table_name to check_query_cache unify cache parameters order `table_name` is more important than `connection_name` formating
Hello,
I was able to successfully integrate your library in my project.
Thank you for the great work. Idiorm in ingenious!
I can now make super complex queries with no problem.
I have a situation here when i need to use my own cache functions
Since those methods are protected:
https://github.com/j4mie/idiorm/blob/master/idiorm.php#L1538
https://github.com/j4mie/idiorm/blob/master/idiorm.php#L1548
https://github.com/j4mie/idiorm/blob/master/idiorm.php#L1565
I cannot override them
Can you please make them public or suggest some way i can swap them with my own functions
Thanks
The text was updated successfully, but these errors were encountered: