Skip to content

Commit

Permalink
Add flag GLOB_NOSORT to glob() for better performance
Browse files Browse the repository at this point in the history
If you don't need sorted results, it’s worthwhile to say so ;)
  • Loading branch information
nigrosimone committed Sep 3, 2016
1 parent 14eab64 commit d87dbcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minit.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static function cache_bump() {
public static function cache_delete() {

$wp_upload_dir = wp_upload_dir();
$minit_files = glob( $wp_upload_dir['basedir'] . '/minit/*' );
$minit_files = glob( $wp_upload_dir['basedir'] . '/minit/*', GLOB_NOSORT );

if ( $minit_files ) {
foreach ( $minit_files as $minit_file ) {
Expand Down

0 comments on commit d87dbcd

Please sign in to comment.