Here's a patch that could help users of the Drupal 6.x version of this module who are getting stuck with shorturl_link tables that grow to millions of rows, taking up gigabytes of valuable database diskspace.

The premise is that some time following the publication of a newsletter, say a month or so, keeping track of clicks becomes less important. However, one can't simply truncate the shorturl_link table as this would break the links in newsletters that have been sent out.

With this patch, we introduce a new setting which controls the decryption of simplenews_statistics short URLs into direct URLs, thus reducing required disk space while maintaining link integrity. The setting takes a number of days, beyond which URLs will become candidates for decryption. The process is triggered by cron and a maximum of 100000 records are processed on each cron run in order to avoid timing out when processsing a large shorturl_link table with millions of rows.

CommentFileSizeAuthor
simplenews_statistics_shorturl.patch2.51 KBlavamind
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

  • Commit a2ad99e on 6.x-3.x authored by lavamind, committed by dieuwe:
    Applied patch from #2205731 'Decrypt short URLs after N days'.
    
dieuwe’s picture

Status: Patch (to be ported) » Closed (fixed)