Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i tried to installed it #12

Open
mxmkmarquette opened this issue May 26, 2018 · 5 comments
Open

i tried to installed it #12

mxmkmarquette opened this issue May 26, 2018 · 5 comments
Labels
question Further information is requested

Comments

@mxmkmarquette
Copy link

mxmkmarquette commented May 26, 2018

sincerly you give too little information on how to install it and make it work.

is it possible to have a procedure because i really love the idea to get this working on my wordpress

or can you explain it to me in a way a slow person get it...

@felixarntz
Copy link
Owner

Note that this is still in development, using in production is at your own risk. It is intended to be used by WordPress installations that are managed via Composer, for example https://github.com/roots/bedrock

I currently don't have any capacity to write a more detailed guide than https://github.com/felixarntz/wp-psr-cache#how-to-install, but having the above approach for your WordPress setup is the first important part. Also note that this library is not standalone, it requires an actual PSR-6 or PSR-16 compatible cache implementation, depending on what your environment is using (Memcache, Redis, something else).

If you have specific questions, I can try to answer them.

@mxmkmarquette
Copy link
Author

yes but it have function.php and object-cache.php habitually object-cache goes into /wp-content/ but where do i put function.php.

@mxmkmarquette
Copy link
Author

Fatal error: Uncaught Error: Class 'LeavesAndLove\WpPsrCache\ObjectCacheService' not found in /home/runcloud/webapps/madmax/wp-content/object-cache.php:16 Stack trace: #0 /home/runcloud/webapps/madmax/wp-includes/load.php(487): require_once() #1 /home/runcloud/webapps/madmax/wp-settings.php(113): wp_start_object_cache() #2 /home/runcloud/webapps/madmax/wp-config.php(96): require_once('/home/runcloud/...') #3 /home/runcloud/webapps/madmax/wp-load.php(37): require_once('/home/runcloud/...') #4 /home/runcloud/webapps/madmax/wp-admin/admin.php(31): require_once('/home/runcloud/...') #5 /home/runcloud/webapps/madmax/wp-admin/index.php(10): require_once('/home/runcloud/...') #6 {main} thrown in /home/runcloud/webapps/madmax/wp-content/object-cache.php on line 16

@mxmkmarquette
Copy link
Author

when use with:

<?php
/**
 * Object cache drop-in
 *
 * @package LeavesAndLove\WpPsrCache
 * @license GNU General Public License, version 2
 * @link    https://github.com/felixarntz/wp-psr-cache
 */

use LeavesAndLove\WpPsrCache\ObjectCacheService;
use Symfony\Component\Cache\Simple\MemcachedCache;
use Symfony\Component\Cache\Simple\ArrayCache;

defined( 'ABSPATH' ) || exit;

ObjectCacheService::loadApi();

/**
 * Defines and thus starts the object cache.
 *
 * @since 1.0.0
 */
function wp_psr_start_cache() {
	$memcached = new Memcached();
	$memcached->addServer( '127.0.0.1', 11211, 20 );

	wp_cache_start( new MemcachedCache( $memcached ), new ArrayCache() );
}

wp_psr_start_cache();

@mxmkmarquette
Copy link
Author

and this should be like this?

"scripts": {
		"post-install-cmd": [
			"cp -rp /web/app/mu-plugins/wp-psr-cache/includes/object-cache.php /web/app/object-cache.php"
		]
	}

at least on my server if not it didn't find the files.

@felixarntz felixarntz added the question Further information is requested label Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants