Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 690 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I empty Drupal Cache (without Devel)

#11
The above code is for Drupal 6.

For Drupal 7 the flush-cache module would be as follows:

<?php
/**
* Implementation of hook_menu()
*/
function flush_cache_menu() {
$items = array();

$items['flush-cache'] = array(
'type' => MENU_NORMAL_ITEM,
'title' => t('Flush the cache'),
'description' => 'Flush all website caches to make sure it updates to relect '.
'your recent changes.',
'page callback' => 'flush_cache_custom_callback',
'access callback' => user_access('flush cache'),
);

return $items;
}

/**
* Implementation of hook_permission()
*/
function flush_cache_permission() {
return array(
'administer my module' => array(
'title' => t('flush cache module'),
'description' => t('Content admin flush cache.'),
),
);
}

/**
* Function that flushes the cache
*/
function flush_cache_custom_callback() {
drupal_flush_all_caches();
return 'Caches were flushed.';
}

Note: that you then flush it by going to:

sitename.com/flush-cache

Make sure you give them permission on the permission page. Clear cache once the "normal" way if the permission doesn't appear after turning the module on.

This is preferable when you don't want your client to get access to the admin menu but you still want them to be able to flush the cache.
Reply

#12
In Drupal 8, the admin menu module isn't quite ready for use yet. And it will probably get replaced with Drupal "Toolbar". So right now there's no easy way to clear cache, without actually going to:

admin/config/development/performance

The only alternative is to add a menu item in the existing toolbar. This can be done by using [this module][1], but as you can see, it still needs a bit of work. I got it working, but had to make a few tweaks.

[1]:

[To see links please register here]

Reply

#13
use drush and this command: drush cc all

If you're using Boost to cache you need to be more specific:

drush @alias_name cc all
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through