Am I able to speed up composer require <package> by somehow disabling the Updating dependencies step? I'm just interested in installing one simple package and not reading all other packages. Making it verbose shows the many, many reads it will do.
Updating dependencies (including require-dev)
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2017-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2017-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2016-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2015-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2014-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2013-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2012-1.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2011-4.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2011-3.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packages.drupal.org-8/drupal-provider-2011-2.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2015.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2016.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2016-07.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2016-10.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2017-01.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-2017-04.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-archived.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/p-provider-latest.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-drupal-composer$drupal-scaffold.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-cweagans$composer-patches.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-composer$installers.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-stdlib.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-escaper.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-feed.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-hydrator.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-psr$http-message.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-diactoros.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-twig$twig.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-mbstring.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$translation.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$validator.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-ircmaxell$password-compat.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-php55.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$serializer.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$routing.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-php54.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$http-foundation.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$psr-http-message-bridge.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-iconv.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-psr$log.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$debug.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$event-dispatcher.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$http-kernel.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-apcu.json from cache
Reading /Users/myuser/.composer/cache/repo/https---packagist.org/provider-symfony$class-loader.json from cache
... Goes on...
It seems that
composer require <package> --no-update
only updates composer.json with definitions for your new package. To actually install the package, you afterwards need to run:
composer update --no-dev <package>
This will install the package without installing development packages.
Related
Is there a need to have Redis snapshots when only using it as a session replication service with Spring Session? I read about Redis Persistence but it seems "persistence" only means backups, and that it is not fully required.
I have a problem in my application that no matter how many times I will call FLUSHALL, it will keep reloading old sessions somehow. I suspect from my RDB file.
Can I just define everything as memory only? Is there any reliability/performance benefits to use an RDB file at all?
I have a problem in my application that no matte how many times I will call FLUSHALL, it will keep reloading old sessions somehow. I suspect from my RDB file.
FLUSHALL will also remove data from RDB file. I think the data might be written by other processes after you called FLUSHALL.
Can I just define everything as memory only?
Yes, you can disable saving db to disk with config file. By default, Redis will save data to disk with some save directives in the config file. For example:
save 900 1
save 300 10
save 60 10000
To disable saving, just comment these save directives or add an empty save directive (i.e. save "").
# save 900 1
# save 300 10
# save 60 10000
Also you can disable AOF persistence logs with config file:
appendonly no
Is there any reliability/performance benefits to use an RDB file at all?
Reliability: Since Redis saves your data to disk, you can recover the data, when you restart Redis. However, if Redis is down accidently, you might lose some data, depends on your save directives in config file.
Performance: There's a performance penalty, especially when you are using RDB persistent with big data in memory.
You can get more details on Redis Persistence from its website.
In the backoffice of Prestashop, there is no option to flush the cache (Advanced parameters - Performance), it is only possible to disable the cache.
Different types of cache and how to flush them
Smarty compile cache: Delete the subfolders under cache/smarty/compile
Smarty template cache: Delete the subfolders under cache/smarty/cache
Cache using Filesystem: Delete the subfolders under cache/cachefs
But how can I go about flushing the cache if I use APC Cache ?
A subsidiary question: Is it possible to set a global ttl ? By default, everything gets cached forever.
To flush the APC user cache, you have to install the administration interface for APC (apc.php). This file is bundled with the download for APC. Just copy it to a folder that is accessible from the web, the edit it to set a password.
After that, you can connect and flush the cache when needed. It is possible to flush the system cache and the user cache separately.
You could write a simple php function: add all cache dirs to array and check it:
foreach ($cacheDirs as $dir)
if (file_exists($dir))
$this->emptydir($dir);
Other way, use a free module to clean it: http://www.prestatoolbox.com/free-prestashop-modules/122-clear-the-cache-of-prestashop.html
We are using AppFabric Caching services with local cache enabled.
the in-memory operations being performed on data (acquired from Cache) seem to be getting saved in local cache (without explicitly placing the updated objects in cache).
What I've read in documentation, local cache just holds a local copy and there are mechanisms to invalidate local Cache as well.
What can I do in order to over-write this local-cache behavior (as per my initial understanding, local-cache contents are read-only, which does not seem the case here)
this the configuration being used:
DataCacheFactoryConfiguration configuration = new DataCacheFactoryConfiguration();
configuration.TransportProperties.MaxBufferSize = int.MaxValue;
configuration.TransportProperties.MaxBufferPoolSize = long.MaxValue;
configuration.MaxConnectionsToServer = MaxConnectionsToServer;
DataCacheServerEndpoint server = new DataCacheServerEndpoint(host, port);
List<DataCacheServerEndpoint> servers = new List<DataCacheServerEndpoint>();
servers.Add(server);
configuration.Servers = servers;
DataCacheLocalCacheProperties localCacheProperties = new DataCacheLocalCacheProperties(MaxObjectCount, LocalCacheTimeout, DataCacheLocalCacheInvalidationPolicy.TimeoutBased);
configuration.LocalCacheProperties = localCacheProperties;
How can I overwrite this behavior of local cache (not using local cache is not an option due to lot of read operations going on) ?
Thanks in advance,
I think this is explained in the documentation (emphasis added):
Locally cached objects are stored within the same process space as the
cache client process. When a cache client requests a locally cached
object, the client receives a reference to the locally cached object
rather than a copy
and
After objects are stored in the local cache, your application
continues to use those objects until they are invalidated, regardless
of whether those objects are updated by another client on the cache
cluster. For this reason, it is best to use local cache for data that
changes infrequently.
Using the preview of Azure redis cache, and it's working great. But I can't figure out how to configure it as LRU cache, as described by the redis docs.
The exception is
StackExchange.Redis.RedisServerException: ERR unknown command 'CONFIG'
My code was
server.ConfigSet("maxmemory", "250m");
server.ConfigSet("maxmemory-policy", "allkeys-lru");
Config has been currently been disabled for the initial Azure Redis Cache (Preview).
We will be selectively be opening this up as we refresh the Preview.
By default the maxmemory-policy is set to volatile-lru.
Update - Max Memory Policy is now configurable via the Cache blade.
Let's say I have a bunch of users who all access the same set of files, that have permission system:anyuser. User1 logs in and accesses some files, and then logs out. When User2 logs in and tries to access the same files, will the cache serve the files, or will it be cleared between users?
The cache should serve the files (in the example above).
How long a file will persist in the OpenAFS cache manager depends on how the client is configured, variables include the configured size of the cache, whether or not the memcache feature is enabled, and how "busy" the client is.
If OpenAFS memcache (cache chunks stored in RAM) is enabled, then the cache is cleared upon reboot. With the more traditional disk cache, the cache can persist across reboots. Aside from that key difference files persist in the cache following the same basic rules. The cache is a fixed size stack, recently accessed files stay in the cache and older files are purged as needed when newer files are requested.
More details are available in the OpenAFS wiki:
http://wiki.openafs.org/